Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

connected host has failed to respond when I run `docker run hello-world` in docker

The lastest version of docker(version 0.6) has been installed in my laptop (windows 10 LTSB) through the installation package docker toolbox. It seems to be installed correctly cause I see the logo of docker when I started the docker quickstart terminal. While when I run docker run hello-world, it returns

$ docker run hello-world
D:\Program Files\Docker Toolbox\docker.exe: An error occurred trying to connect: Post https://192.168.99.100:2376/v1.24/containers/create: dial tcp 192.168.99.100:2376: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond..
See 'D:\Program Files\Docker Toolbox\docker.exe run --help'.

By the way, I open the vpn through cisco anyconnect. However, when I disconnect the vpn and run the hello world, it seems to just froze at

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pulling fs layer 

What happened? Can you find what's wrong with the docker or vpn?

like image 365
QM.py Avatar asked Oct 29 '22 14:10

QM.py


1 Answers

You should first create a default machine (or start if already created):

docker-machine create default

Then get the environment commands for your new VM:

docker-machine env

And then connect your shell to the new machine:

eval "$(docker-machine env default)"

After then docker run hello-world is expected to work fine. I tested on Windows 10Pro with Docker-Toolbox

like image 61
Erkan Şirin Avatar answered Nov 15 '22 06:11

Erkan Şirin