Docker: Could not read CA certificate: no such file or directory

I’m on OSX and I’ve used docker-machine before, but now that there is a native Docker for Mac I wanted to install that.
So I uninstalled docker-machine using this uninstall script, and then I installed and started Docker for Mac without a problem.

I can run docker --help, which shows me all options as expected.

  • Docker build leads to “no space left on device” on Windows 10
  • How to gain bash access to a docker container after its ran
  • Install redmine plug-in using docker container
  • Docker: Layering on top of shared volume
  • /etc/hosts file of a docker container gets overwritten
  • Running a bash script inside a Docker container
  • When I run docker ps however, I get the following:

    $ docker ps
    Could not read CA certificate “/Users/kramer65/.docker/machine/machines/default/ca.pem”: open /Users/kramer65/.docker/machine/machines/default/ca.pem: no such file or directory

    I tried the solution from this answer (including sourcing the .bash_profile to activate it), but that didn’t solve anything.

    Does anybody know what I can do to solve this?

  • How to remove old docker images in continuous integration to save disk space
  • Correct way to change tcp_keepalives settings in postgres docker container
  • Copy file to a Docker container before starting it
  • Chronicle map and docker containers?
  • Docker link to previously started containers
  • How to create a MongoDB docker and save the DB's configuration?
  • One Solution collect form web for “Docker: Could not read CA certificate: no such file or directory”

    Please remove your old docker-machine

    docker-machine rm default

    then, edit your .bashrc .profile or .zshrc ( whatever you use ) and remove anything that exports DOCKER env variables ( like socket, host, port and so on ).

    Restart your shell at least, you can restart your mac. When you do

    env | grep DOCKER

    You should see nothing. docker ps should now work flawlessly.

    The problem is that the old dockertoolbox defines a custom host / port and puts that into your bashrc and does not remove it after deinstallation.

    docker for mac uses the unix default socket, but it will not get picked up until you remove those old ENV variales

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.