Skip to content

Include Host Root CAs in Docker Mode #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ init-remote:
echo "$$ACTIVATE_TEMPLATE" >./bin/activate
echo "$$RSH_TEMPLATE" >./bin/rsh
chmod a+x ./bin/rsh
${MAKE} init-remote-${DEVMODE}
${MAKE} sync-once bin/sync
${RSH} sh -ce "echo local > .devmode"
${RSH} make init-env
Expand All @@ -94,6 +95,25 @@ init-remote:
.PHONY: init-remote


init-remote-local:
.PHONY: init-remote-local

init-remote-docker:
HOST_CERTS=/tmp/host_certificates.pem; \
case "`uname -s`" in \
Linux) cp /etc/ssl/certs/ca-certificates.crt $$HOST_CERTS;; \
Darwin) security find-certificate -a -p /Library/Keychains/System.keychain > $$HOST_CERTS;; \
*) touch $$HOST_CERTS;; \
esac; \
docker cp $$HOST_CERTS `docker-compose ps -q develop`:/tmp/host_certificates.pem
${RSH} csplit --quiet --prefix=/usr/local/share/ca-certificates/host_certificate_ --suffix='%02d.crt' --elide-empty-files /tmp/host_certificates.pem '/-----BEGIN CERTIFICATE-----/' '{*}'
${RSH} update-ca-certificates
.PHONY: init-remote-docker

init-remote-kube:
.PHONY: init-remote-kube


# Create the environment and install development tools.
init-env:
python3 -m venv ${CURDIR}
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ services:
- npm_config_cache=/cache/npm
- YARN_CACHE_FOLDER=/cache/yarn
- PIP_CACHE_DIR=/cache/pip
- REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
- NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
cap_add:
- NET_ADMIN
sysctls:
Expand Down