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.

  • RabbitMQ on Docker: Pika hangs on connection when given port, connection refused without port
  • Supervisor & Docker: How to exit Supervisor if a service doesn't start?
  • Connecting to percona docker from a java docker container
  • Load balancing of network requests between replicas of services in docker swarm mode
  • How to change dockerd parameters with systemd? [duplicate]
  • Can't see files with Docker on Windows 10
  • Install Docker in container for use by GitLab CI build
  • selinux issues with Openshift 3.4 with dynamic persistant volumes using glusterfs
  • How long will kube-controller-manager migrate one pod from a shutdown node to another health node
  • docker metrics reside in different location for different environment or versions
  • update git version in docker container
  • an established connection was aborted by the software in your host machine Docker
  • 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.