简体   繁体   中英

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.

You can also try regenerating the certificates for that docker-machine (eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM