I am attempting to migrate from boot2docker to docker-machine.
I followed the directions here to install docker but I keep getting the following message:
Could not read CA certificate "/Users/<useraccountfolder>/.boot2docker/certs/boot2docker-vm/ca.pem": open /Users/<useraccountfolder>/.boot2docker/certs/boot2docker-vm/ca.pem: no such file or directory
when I run most any docker command.
I found my solution here
I needed to update my .bash_profile to look like:
and then run the following to generate the missing ca.pem:
I posted this in case this could help anyone else. Thanks/props go to everyone in that thread on github which was found after an hour of pain.
If it still doesn't work, run:
To find out where it is, and then modify
DOCKER_CERT_PATH=<the path you find out>
, and on a Mac, it must be.bash_profile
. If you input this in yo.oh-my-zsh
it won't work.My solution in macOS to clean the reference to the missing certs, that were not in
~/.bash_profile
or~/.bashrc
was:Source: https://forums.docker.com/t/initial-install-of-docker-for-mac-could-not-read-ca-certificate/9170/7
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
. It seems a long term solution.vim ~/.bash_profile
Comment something like DOCKER_*
source ~/.bash_profile
docker info
ordocker ps
Hope it helps.
Docker from the launchpad on my Mac quit working as well as commands from terminal. I'm just going to say what I did to fix it for me regardless of whether it makes sense in case it helps someone else out.
unset ${!DOCKER*}
I then ran:
I then ran:
docker
(which only partially worked)unset ${!DOCKER*}
againI encountered the same error due to the reason that I had setup the environment to a particular docker machine which I later deleted but my environment was still set to the deleted machine. So docker calls were being redirected the a non-existant machine causing the error.
I unset the environment variables and the issue was fixed:
To see which environment variable would be unset run: