Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker-machine : ca.pem not found

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.

like image 272
Rahul Avatar asked Jul 22 '15 11:07

Rahul


2 Answers

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).

like image 119
yash.vyas Avatar answered Nov 07 '22 11:11

yash.vyas


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.

like image 4
sssanjaya Avatar answered Nov 07 '22 13:11

sssanjaya