Last active
August 29, 2015 14:27
-
-
Save lgmkr/d6d68e7287303ab28650 to your computer and use it in GitHub Desktop.
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 characters
Boot2Docker-cli version: v1.7.1 | |
Git commit: 8fdc6f5 | |
docker: 1.7.1, build 786b29d | |
boot2docker ssh | |
sudo curl -o /var/lib/boot2docker/profile https://gist.githubusercontent.com/garthk/d5a17007c277aa5c76de/raw/3d09c77aae38b4f2809d504784965f5a16f2de4c/profile | |
sudo halt | |
#maybe reboot macosx | |
#reboot(powerof) boot2docker vm manualy in VM GUI | |
boot2docker up | |
#reboot(powerof) boot2docker vm manualy in VM GUI | |
Disable TLS | |
Docker with boot2docker | |
When installing docker in OSX environment we are using boot2docker light weight linux virtual machine | |
More info Install docker with boo2docker | |
By default the Docker daemon on boot2docker only activates the TLS encrypted socket (port: 2376) | |
It auto-generates certificates and stores them in /home/docker/.docker inside the VM | |
The boot2docker up command will copy them to ~/.boot2docker/certs on the host machine | |
Once the VM has started, and output the correct values for the DOCKER_CERT_PATH and DOCKER_TLS_VERIFY environment variables. | |
In default setup we use following environment variable | |
export DOCKER_HOST=tcp://192.168.59.103:2376 | |
exportDOCKER_CERT_PATH=/Users/eranga/.boot2docker/certs/boot2docker-vm | |
export DOCKER_TLS_VERIFY=1 | |
Note that the DOCKER_HOST use 2376 port | |
Picture | |
Disable TLS | |
To use boot2docker with an unencrypted Docker socket you have to disable TLS | |
1. Set DOCKER_TLS in boot2docker VM | |
Add DOCKER_TLS=no to boot2docker configuration profile | |
# ssh to boot2docker from host machine(OSX) | |
boot2docker up | |
boot2docker ssh | |
# add DOCKER_TLS=no | |
vi /var/lib/boot2docker/profile | |
# restart docker service in boot2docker | |
sudo /etc/init.d/docker restart | |
# exit from boot2docker vm | |
exit | |
Now /var/lib/boot2docker/profile would looks like below | |
Picture | |
2. Set docker environment variables in host machine | |
Add following environment variables to ~/.bashrc(or ~/.zshrc if you using zsh shell) in your host OSX machine | |
# set up boot2docker environment variables | |
export DOCKER_HOST=tcp://192.168.59.103:2375 | |
unset DOCKER_TLS_VERIFY | |
unset DOCKER_CERT_PATH | |
Note that DOCKER_HOST use 2375 port | |
Picture | |
More info boot2docker TLS support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment