After installing Docker, docker-machine env default fails because ca.pem is not found

Just installed Docker, but docker-machine env default doesn’t work:

$ docker-machine env default
open /Users/me/.docker/machine/machines/default/ca.pem: no such file or directory

The path /Users/me/.docker/machine/machines/default exists but there’s no ca.pem in it. Just a bunch of other files.

  • What is best practice for sharing database between containers in docker?
  • Hyperledger Fabric with docker not storing data after restart
  • Dockerfile: understanding VOLUME instruction
  • Set up docker remote execution on windows
  • How can an iptables 443 redirection on my host interfere with outbound HTTPS requests from my Docker container?
  • Adding CPUs accessible by docker for TensorFlow on Windows 10
  • Dockerizing npm & bower install using the digitallyseamless/nodejs-bower-grunt docker image
  • How to let docker container access host network port
  • Maven build with parameter somehow cache parameter in war?
  • How can I Provide Multiple Statefull Instances of an Application with Docker?
  • pip install django-allauth UnicodeDecodeError
  • Dockerfile COPY instruction failing?
  • 3 Solutions collect form web for “After installing Docker, docker-machine env default fails because ca.pem is not found”

    You can also try regenerating the certificates for that docker-machine (e.g. default)

    docker-machine regenerate-certs default
    docker-machine restart default

    Usually during the creation of a machine the certs are set up. Just create a new machine from scratch like:

    docker-machine create --driver virtualbox dev
    docker-machine env dev

    That should work.

    If you are connected to a VPN while creating the VM, that may cause networking issues that prevent the CA from being properly shared. Try disconnecting from any VPNs before creating the VM.

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