Closed IdanAdar closed 8 years ago
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/idanadar/.docker/machine/machines/default
Thanks for figuring out and it works. I was having the exact case.
+1 this definitely worked out for me as well.
$ docker-machine env default
open /Users/dgempesaw/.docker/machine/machines/default/ca.pem: no such file or directory
I was also migrating from boot2docker
to docker-machine
. After clearing out boot2docker's settings from my ~/.bash_profile
as suggested, docker-machine env
was having trouble finding that ca.pem
, which is oddly in the OP's error as well. The missing ca.pem
file was fixed by doing
$ docker-machine regenerate-certs default
:D
Thanks, it worked for me.
:+1: saved me a huge headache. This should definitely be added to the FAQ on https://www.docker.com/toolbox
gempesaw's solution (regenerate-certs) worked for me too.
gempesaw's solution (regenerate-certs) worked for me too. :D :dancer:
Thanks @IdanAdar sorted it perfectly. This was driving me mad.
+1. thanks!
fixity fixed. Thanks!
@IdanAdar thank you. You're solution still works and I agree with @elgreg that this should be a part of the starter document from docker for the migrators from boot2dock.
@gempesaw thank you. This solution worked.
I seem to be having this issue with Docker Toolbox. When running:
docker-machine regenerate-certs default
I get the following: Regenerating TLS certificates Host does not exist: "default"
It appears as though the quick start terminal doesn't create a machines directory with the default machine in it. Anyone else have this issue?
It appears as though running Kitematic generated the default VM and fixed this issue for me. Still think it should be considered a bug as the Quickstart Terminal should have created it.
@bmfallon +1
The Quickstart Terminal doesn't work, but running Kitematic fixed it somehow.
For others... I had old environment variables in both my zsh and bash rc files which conflicted with the newer Docker Quickstart Terminal. After I removed the older zsh and bash rc crap I manually configured a while ago it worked.
I have the same issue on using the very latest docker for windows:
Could not read CA certificate "C:\\Users\\ryan\\.docker\\machine\\machines\\default\\ca.pem": open C:\Users\ryan\.docker\machine\machines\default\ca.pem: The system cannot find the file specified.
Copying the certificates from:
C:\Users\ryan\.docker\machine\certs
..into that directory fix the problem; although it would be nice if it just worked.
Use-case: I'm just working through the docker hello-world use-case on my new Windows 10 machine.
Thanks a lot!
By the way, just curious, will all of these problems go away when Docker goes native on OS X?
Thanks@IdanAdar, it works for me.
cp -f ~/.docker/machine/certs/* ~/.docker/machine/machines/dev/
worked for me
Usually most people have install boot2docker and old version of virtualbox. As said in installation guide, before installing Docker for Mac, we have to uninstall boot2docker and reinstall virtualbox to high version. https://docs.docker.com/engine/installation/mac/#/docker-for-mac
Even though we have installed Docker for Mac, we still encountered error "Could not read CA certificate".
My solution is to remove the docker related environment variables (DOCKER_) from .bash_profile.
vim ~/.bash_profile
source ~/.bash_profile
docker info
or docker ps
Hope it helps.
So... I wanted to start afresh. For this, I used the boot2docker "uninstaller": https://github.com/boot2docker/osx-installer/blob/master/uninstall.sh
I then installed Docker Toolbox, but I'm getting the following:
docker is configured to use the default machine with IP 192.168.99.100 For help getting started, check out the docs at https://docs.docker.com
open /Users/idanadar/.docker/machine/machines/default/ca.pem: no such file or directory bash-3.2$ docker run hello-world Could not read CA certificate "/Users/idanadar/.boot2docker/certs/boot2docker-vm/ca.pem": open /Users/idanadar/.boot2docker/certs/boot2docker-vm/ca.pem: no such file or directory bash-3.2$
How do I fix this?