Every time my Docker accesses a domain, even for performing Docker Login, it throws an error:
Error response from daemon: Get "/": 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