Docker error on Windows 2016 “Client.Timeout excee

2019-05-05 03:28发布

I get the following error when I try to do "docker run" on my Windows 2016.

PS C:\Users\Administrator> docker run microsoft/sample-dotnet
Unable to find image 'microsoft/sample-dotnet:latest' locally
C:\Program Files\Docker\docker.exe: 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 'C:\Program Files\Docker\docker.exe run --help'.

I followed the instructions here to get started.

This is different from this question because this is Windows.

Any ideas?

5条回答
时光不老,我们不散
2楼-- · 2019-05-05 04:08

Go to Docker settings > network > DNS server . change from automatic to fixed ( default is 8.8.8.8 ) . worked on win 10

查看更多
Ridiculous、
3楼-- · 2019-05-05 04:09

It turns out I needed to set the proxy as per this link.

Here is an example of what I had to do (replacing my proxy address):

[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://myproxy:80/", [EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("HTTPS_PROXY", "https://myproxy:80/", [EnvironmentVariableTarget]::Machine)
restart-service docker
查看更多
4楼-- · 2019-05-05 04:16

same Problem for Windows. Some people wrote to delete dns 8.8.8.8 from resolve.conf But i added this dns to my Settings (right click on docker icon -> Network -> Set DNS to Fixed (8.8.8.8)

查看更多
放荡不羁爱自由
5楼-- · 2019-05-05 04:21

Kindly launch the docker setting and set your dns to 8.8.8.8

查看更多
叼着烟拽天下
6楼-- · 2019-05-05 04:28

Ubuntu, Centos

Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that 
mkdir -p /etc/systemd/system/docker.service.d
sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
adds the HTTP_PROXY environment variable:

[Service]
Environment="HTTP_PROXY=http://172.28.5.202:3128/"

Or, if you are behind an HTTPS proxy server, create a file called

/etc/systemd/system/docker.service.d/https-proxy.conf that adds the HTTPS_PROXY environment variable:
[Service]
Environment="HTTPS_PROXY=http://172.28.5.202:3128/"

Flush changes:

$ sudo systemctl daemon-reload
Restart Docker:
$ sudo systemctl restart docker

It worked!

查看更多
登录 后发表回答