简体   繁体   English

无法在本地 Docker 中找到图像“hello-world:latest”

[英]Unable to find image 'hello-world:latest' locally Docker

This is the first time I am trying to set up docker (version 17.09.0-ce).这是我第一次尝试设置 docker(版本 17.09.0-ce)。 I have followed the all instructions from official site and this run ok on my machine (Windows 10 x64).我已经按照官方网站上的所有说明进行操作,这在我的机器上运行正常(Windows 10 x64)。 When I type docker --version on console returns Docker version 17.09.0-ce, build afdb6d4 .当我在控制台上输入Docker version 17.09.0-ce, build afdb6d4 docker --version时返回Docker version 17.09.0-ce, build afdb6d4 But i am trying execute docker run -t hello-world and this is the answer:但我正在尝试执行docker run -t hello-world这就是答案:

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.

my internet is from proxy, but I make a VPN and everything work perfectly except docker, I even install python packages using pip.我的互联网来自代理,但我制作了一个 VPN,除了 docker 之外,一切都完美无缺,我什至使用 pip 安装了 python 包。 what could be wrong?有什么问题?

I resolved this issue on windows 10 by resetting the DNS server to use the Google DNS fixed address: 8.8.8.8 ( docker documentation )我通过重置 DNS 服务器以使用 Google DNS 固定地址在 Windows 10 上解决了这个问题:8.8.8.8( docker 文档

在此处输入图片说明

This should resolve the issues for most.这应该可以解决大多数问题。

For windows behind a proxy, you can do the followings to resolve this issue go to your proxy setting under resources and enter your proxy credentials username:password@yourdomain:port .对于代理背后的 Windows,您可以执行以下操作来解决此问题,请转到资源下的代理设置并输入您的代理凭据username:password@yourdomain:port

Important make sure to account for special character Unicode conversion for example, if you have # in your password then you replace it with: %23 you can covert special characters via site .重要的是确保考虑特殊字符 Unicode 转换,例如,如果您的密码中有 # ,那么您将其替换为: %23您可以通过site隐藏特殊字符。

I resolve this modifing daemon.json and put my proxy there.我解决了这个修改daemon.json并将我的代理放在那里。 In case of Windows on Docker Desktop, go to Resources, Proxies:如果是 Docker 桌面上的 Windows,请转到资源、代理:

docker 桌面代理配置

For users in China, I recommand this answer .对于中国用户,我推荐这个答案

You need to add a valid address to pull the image "hello-world".您需要添加一个有效地址来拉取图像“hello-world”。

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

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