Initial install of Docker for Mac - Could not read CA certificate

I downloaded Docker for Mac this afternoon, de-installed dinghy (via brew) and ancillary software.

I installed Docker for Mac and then typed in Terminal:

docker version

I get the following message about a missing certificate:

Could not read CA certificate “/Users/randolph.kahle/.boot2docker/certs/boot2docker-vm/ca.pem”: open /Users/randolph.kahle/.boot2docker/certs/boot2docker-vm/ca.pem: no such file or directory

What should I do?

Thanks – Randy

1 Like

I missed the directions guiding me to “unset” a group of environment variables.

– Randy

1 Like

Same here, thanks for updating!

For any other ppl looking for this, see this section on unsetting Docker vars:

Do any of you have the commands for this? The link points to a page that no longer exists.

To unset all the DOCKER_x variables that docker-machine uses and that are causing native Docker to be upset, execute

unset ${!DOCKER*}

It works. Simple and efficient. :grinning:

This worked for me, thanks joemcmahon!

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.

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.

  1. vim ~/.bash_profile

  2. Comment something like DOCKER_*

  3. source ~/.bash_profile

  4. relaunch the terminal, you should have no problem on running : docker info or docker ps

Hope it helps.

It works for me :slight_smile:

A better way to unset docker machine is eval $(docker-machine env -u) in mac/linux.


It worked. Thank you so much.

It worked perfectly! Thanks a lot!

Thanks Joe! Worked liked a dream