0

Every time my Docker accesses a domain, even for performing Docker Login, it throws an error:

Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 10.255.255.254:53: no such host

The only solution I found to fix this is to keep adding the current IP to the Docker's /etc/hosts for each domain that fails. For example:

Fetching the IP: dig registry-1.docker.io +short

Adding it to the hosts file: nano /etc/hosts

Example: 34.000.000.145 registry-1.docker.io

->I would like to know if there's any alternative, something I can do to always use my IP and allow direct access to any domain without having to add each one individually. Thanks in advance

1
  • Your host environment's DNS is broken. You might follow this up with your local IT support, but it's not a programming-related problem. I would avoid trying to work around this with /etc/hosts. Commented Mar 21 at 15:00

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.