简体   繁体   中英

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?

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

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