Closed phuongnd08 closed 9 years ago
Hmm, that's weird. Doing boot2docker shellinit
prints some variables but it does not apply to current shell. I copy these variables to ~/.bashrc and docker is working properly now. Here's my variables:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/my/home/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
@phuongnd08 you need to run $(boot2docker shellinit)
for it to be applied to your current bash
exporting DOCKER_TLS_VERIFY=1 solved the problem, but boot2docker shellinit does not return anything about DOCKER_TLS_VERIFY
$ boot2docker shellinit Writing /Users/avyatkin/.docker/boot2docker-vm/ca.pem: Writing /Users/avyatkin/.docker/boot2docker-vm/cert.pem: Writing /Users/avyatkin/.docker/boot2docker-vm/key.pem: export DOCKER_HOST=tcp://192.168.59.103:2376 export DOCKER_CERT_PATH=/Users/avyatkin/.docker/boot2docker-vm
If you do not perform $(boot2docker shellinit) the pem
files are not written at all giving a different error. So be sure the pem files exist and match.
The issue was with my .bash_profile. It should be like this:
export DOCKER_HOST=tcp://192.168.99.100:2376 export DOCKER_MACHINE_NAME=default export DOCKER_TLS_VERIFY=1 export DOCKER_CERT_PATH=/Users/username/.docker/machine/machines/default
I've just upgraded to 1.3.0, did a boot2docker upgrade and then:
Look like the tcp port is changed from 2375 to 2376? But the mac version wasn't updated somehow? Though the 2376 looks like magic, cause changing
$DOCKER_HOST
totcp://192.168.59.103:2376
I'll get: