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.

  • How to remove old and unused Docker images
  • Can't discover docker container on user defined network
  • Dockerfile for Rails app - Permission Denied
  • Unable to deploy docker image from intellij plugin
  • How to get user ip, if the requests go through hyberkube?
  • Creating a python script for selenium testing
  • How is digest of Docker image calculated?
  • Unable to run Docker within another Docker container
  • Share connection details with container and host
  • DocumentDB in Docker - “The authorization token is not valid at the current time.”
  • When does Docker image cache invalidation occur?
  • Wake On Lan - Linux - .Net Core
  • 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.