Docker-machine : ca.pem not found

守給你的承諾、 提交于 2020-01-13 10:42:52

问题


Here i am creating a test machine(dev) using the docker machine.

$ docker-machine create -d virtualbox dev
Creating CA: C:\Users\xxx\.docker\machine\certs\ca.pem
Creating client certificate: C:\Users\xxx\.docker\machine\certs\cert.pem
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...

The vm gets created and runs with out flaws. And here is the error when i run the following command:

$ docker-machine env dev

open C:\Users\xxx\.docker\machine\machines\dev\ca.pem: The system cannot fin
d the file specified.

I have no idea how to deal with this problem. Tried restarting boot2docker.


回答1:


You should try using docker-machine regenerate-certs dev. The problem i think is that somehow your .pem file got deleted or was not created. I had the same issue and regenerating the certs fixed the problem (reboot did not help btw).




回答2:


I was getting the exact same error. It turned out to be the Cisco AnyConnect client affecting my networking settings. It's not enough to quit AnyConnect, you have to reboot your machine to restore your settings.

If someone knows more about how AnyConnect is affecting things and if there are solutions better than rebooting, I'd love to hear about it!




回答3:


Copy certificates from "C:\Users\xxx\.docker\machine\certs"

Paste certificates to "C:\Users\xxx\.docker\machine\machines\dev"




回答4:


I guess you are getting Docker-machine : ca.pem not found error even when you use docker info or any command with docker

Try this command: docker-machine env -u output will be similar to:

unset DOCKER_TLS_VERIFY

unset DOCKER_HOST

unset DOCKER_CERT_PATH

unset DOCKER_MACHINE_NAME

# Run this command to configure your shell:

# eval $(docker-machine env -u)

now enter eval $(docker-machine env -u)

this should do the work. Try docker info to be sure finally.



来源:https://stackoverflow.com/questions/31561801/docker-machine-ca-pem-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!