Docker Community Forums

Share and learn in the Docker community.

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


(Randolph Kahle) #1

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


(Randolph Kahle) #2

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

– Randy


(Pål Brattberg) #3

Same here, thanks for updating!

For any other ppl looking for this, see this section on unsetting Docker vars: https://beta.docker.com/docs/mac/docker-toolbox/#setting-up-to-run-docker-for-mac:531458e0adb85f8031f7747eda2e2a76


(Mobilecapptivate) #4

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


(Joe McMahon) #5

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

unset ${!DOCKER*}

(Kong Lee) #6

It works. Simple and efficient. :grinning:


(Bjhytrek) #7

This worked for me, thanks joemcmahon!


(Kong Lee) #8

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.

  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.


(Hugohenrique) #9

It works for me :slight_smile:


(Helixector) #10

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

See https://docs.docker.com/machine/reference/env/


(Ramankc) #11

It worked. Thank you so much.


(Branjos) #12

It worked perfectly! Thanks a lot!


(Doniem) #13

Thanks Joe! Worked liked a dream