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.

  • Using 'pyenv activate' in a Dockerfile
  • Docker error: too many open files
  • cannot ssh Docker Provided Container with Vagrant. Vagrant ssh doesnt work too
  • Cluster of forward proxies
  • OpenFOAM installation for Windows - \config.json: The system cannot find the file specified
  • Connect to a service in docker, run from an interactive shell
  • 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?

  • Eliminate mess with docker swarm mode loadbalancer, consul and external load balancer
  • log_driver param doesn't work on ansible 2.0
  • Debug Django project with environment in docker container
  • How can I create predictive mappings between network interface names and bridged networks in docker
  • Docker container bash can't connect to local MySQL server through socket
  • Dockerized Angular 4, Django and postgresql - Process exited with status 127, error code=H10 desc=“App crashed”
  • 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.