After I restarted my windows i cannot connect to docker machine running in Oracle Virtual Box. When i start Docker QuickStart Terminal every thing looks fine, it's coming up OK and it gives me this message:
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
but when i do:
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Timeout
and:
λ docker images
An error occurred trying to connect: Get http://localhost:2375/v1.21/images/json: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it.
also when i try to reinitialize my env., i get:
λ docker-machine env default
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: i/o timeout
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.
BTW, Regenerating certs also not helping. Any idea?
Thanks.
Here is what worked for me. The first steps are similar to what Hazhir proposed, then followed by regenerate the certificates.
docker-machine start
.docker-machine env
. If you're like me then you'd get following error:Which is good. Now all we need to do is to run
Then test it again with
docker-machine env
. If you get:Then you're all set. In my case I needed to start my virtual machine by running Docker Quickstart Terminal.
This worked for me:
rmdir.exe --ignore-fail-on-non-empty ~/.docker/
docker-machine start
docker-machine env
eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default)
(added also at the end of my.bash_profile
.docker run hello-world
<-- now rorkingInspired in a post here.