'Docker: can't run hello-world. Windows 10

I'm a newbie in docker. I try to run

$ docker run hello-world

And I got this error:

$ docker run hello-world
    Unable to find image 'hello-world:latest' locally
    Pulling repository docker.io/library/hello-world
    C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy..
    See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

Also I allowed all points for this app in firewall screenshot



Solution 1:[1]

I ran into that issue while moving from mac to windows. I would recommend to check the following things:

  • How many network adapters do you have? Check if there are too many and if docker is using the correct one. In case you have too many - delete the one which is not being used
  • for some people the network protocol IP6 needed to be deactivated to get docker to talk to the internet
  • check your traffic on the network adapter - in case you are using hyper-v you need to make sure that the network adapter is allowed to use the one which is connected to the internet

I hope this gave you a notch into the right direction.

Solution 2:[2]

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

Solution 3:[3]

After installing the docker for windows, I got the error as below.

PS C:\Users<Username>> docker run 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 (Client.Timeout exceeded while awaiting headers).

So made changes in docker > Settings > Resources > Network > updated docker subnet to 10.0.75.0/24.

It worked like charm after.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pixelartist
Solution 2 Govind Kalyankar
Solution 3 Mohan