13

This is the first time I am trying to set up docker (version 17.09.0-ce). I have followed the all instructions from official site and this run ok on my machine (Windows 10 x64). When I type docker --version on console returns Docker version 17.09.0-ce, build afdb6d4. But i am trying execute docker run -t hello-world and this is the answer:

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. what could be wrong?

Reinier Hernández
  • 428
  • 1
  • 6
  • 22
  • 1
    Are you sure that the docker daemon process is using this VPN/proxy setup? When you run `docker run` that is a client process talking to the docker daemon over a named pipe (on Windows), and then the docker daemon actually tries to make the network connection to pull content from the Docker registry (registry-1.docker.io). You may need to validate that the Docker engine/daemon is able to reach the internet to solve this issue (e.g. it is probably running as a service and may need environment configuration for the VPN?) – Phil E Nov 06 '17 at 16:22
  • @PhilE and how I can resolve this? – Reinier Hernández Nov 07 '17 at 18:22
  • 1
    Found an answer for a related question: https://stackoverflow.com/questions/23111631/cannot-download-docker-images-behind-a-proxy – xobes Jan 05 '18 at 20:37

4 Answers4

3

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)

enter image description here

Govind Kalyankar
  • 574
  • 1
  • 4
  • 17
1

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.

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.

Lin Du
  • 88,126
  • 95
  • 281
  • 483
0

I resolve this modifing daemon.json and put my proxy there. In case of Windows on Docker Desktop, go to Resources, Proxies:

docker desktop proxy config

Reinier Hernández
  • 428
  • 1
  • 6
  • 22
0

For users in China, I recommand this answer.

You need to add a valid address to pull the image "hello-world".

zheyuanWang
  • 1,158
  • 2
  • 16
  • 30