最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

dns - How to Resolve Docker Domain Access Errors Without Manually Updating etchosts? - Stack Overflow

programmeradmin6浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论