-
-
Save pan-rui/6e735eb193ba22de4be2aef71daaf85c to your computer and use it in GitHub Desktop.
Revisions
-
gesellix revised this gist
Apr 21, 2016 . 2 changed files with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ #!/bin/sh mkdir -p certs openssl req -x509 -days 365 -newkey rsa:4096 -nodes -sha256 -out certs/domain.crt -keyout certs/domain.key -subj "/C=DE/ST=Berlin/L=Berlin/O=IT/CN=docker.local" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,12 @@ see [https://forums.docker.com/t/adding-self-signed-certificates/9761](https://forums.docker.com/t/adding-self-signed-certificates/9761). - create certificates (see create-certs.sh) - move the certificates to a directory somewhere in `/Users/....`. We'll be able to copy files from there into the VM as it will already be mounted by Docker. - attach to the TTY: `screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty` - copy the certificates into the vm: `mkdir -p /etc/docker/certs.d/mydomain.com:5000 && cp /Users/.../certs/domain.crt /etc/docker/certs.d/mydomain.com/ca.crt` - restart Docker: `service docker restart`
-
gesellix revised this gist
Apr 21, 2016 . 1 changed file with 6 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,6 @@ see [https://forums.docker.com/t/adding-self-signed-certificates/9761](https://forums.docker.com/t/adding-self-signed-certificates/9761). - move the certificates to a directory somewhere in `/Users/....`. We'll be able to copy files from there into the VM as it will already be mounted by Docker. - attach to the TTY: `screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty` - copy the certificates into the vm: `mkdir -p /etc/docker/certs.d/mydomain.com:5000 && cp /Users/.../certs/domain.crt /etc/docker/certs.d/mydomain.com/ca.crt` - restart Docker: `service docker restart` -
gesellix created this gist
Apr 21, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ # log into the vm user root, no password screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty # copy certificates from host into the vm (/Users is mounted) cp /Users/username/.../cert.* /tmp # configure daemon to use the certificates # ... # reload dameon # service docker restart