skip to Main Content

I am trying to configure an environment on Windows 10 using docker and docker-compose, but I am not being able to pull the images from the docker registry.

Everytime I run docker-compose up -d, I get the error below:

Pulling queue (redis:)...
ERROR: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: read udp 192.168.65.3:36785->192.168.65.1:53: i/o timeout

I’ve looked around online and some people recommended setting the DNS server to a fixed one: 8.8.8.8. I did this, but I still have the problem.

UPDATE

As per @kaki suggestion, I looked at my hosts file and I saw several entries that were regarding docker:

100.114.69.30 host.docker.internal
100.114.69.30 gateway.docker.internal
 host.docker.internal
 gateway.docker.internal
 192.168.1.103 host.docker.internal
 192.168.1.103 gateway.docker.internal
# Added by Docker Desktop
 192.168.0.11 host.docker.internal
 192.168.0.11 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

I removed all of them but these:

100.114.69.30 host.docker.internal
100.114.69.30 gateway.docker.internal
127.0.0.1 kubernetes.docker.internal
# End of section

and things started working.

2

Answers


  1. For some reason your network adapter thinks this domain can be found in your lan, in order to fix this I would try to see whether your C:WindowsSystem32driversetchosts has been changed to this value (the computer checks the hosts file before querying the dns server).
    If this one doesn’t solve the problem I would ask the network admin about the issue in case that you are working in an enterprise environment, otherwise if it is private I would check the router settings.

    Login or Signup to reply.
  2. I was also facing the same issues. I have tried to remove the below lines from the host file

    Added by Docker Desktop

    100.114.69.30 host.docker.internal
    100.114.69.30 gateway.docker.internal
    127.0.0.1 kubernetes.docker.internal

    End of section

    But still same problem while writing the command line – docker login; in PowerShell. Then I clean the data using docker desktop troubleshooting option and restart the docker, it’s working
    enter image description here

    Here is the below PowerShell script

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search