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?

3
  • 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 6, 2017 at 16:22
  • @PhilE and how I can resolve this? Nov 7, 2017 at 18:22
  • 1
    Found an answer for a related question: stackoverflow.com/questions/23111631/…
    – xobes
    Jan 5, 2018 at 20:37

4 Answers 4

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

0
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.

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

0

For users in China, I recommand this answer.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.