繁体   English   中英

当我在docker中运行`docker run hello-world`时,已连接的主机无法响应

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

最新版本的docker(版本0.6)已通过安装包docker docker toolbox安装在我的笔记本电脑(Windows 10 LTSB)中。 它似乎安装正确因为我在启动docker quickstart terminal时看到了docker的标识。 当我运行docker run hello-world ,它会返回

$ 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'.

顺便说一句,我通过cisco anyconnect打开vpn。 然而,当我断开vpn并运行hello world ,它似乎只是冻结了

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

发生了什么? 你能找到docker或vpn的错误吗?

您应该首先创建一个默认机器(或者如果已经创建则启动):

docker-machine create default

然后获取新VM的环境命令:

docker-machine env

然后将shell连接到新机器:

eval "$(docker-machine env default)"

之后docker run hello-world预计会正常工作。 我在Windows 10Pro上使用Docker-Toolbox进行了测试

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM