英文:
Docker compose cannot pull images failing with Network Unreachable
问题
我有一个脚本用于从Docker注册表中获取一些镜像,但它失败了。
我有一个安装了版本为24.0.2的docker和版本为1.25.0的docker-compose的Ubuntu 20。我收到了以下错误信息。
有人可以帮助我理解出了什么问题,以及如何修复它吗?
英文:
I have a script to pull some images from docker registry but it's failing
I have an Ubuntu 20 and docker installed with version 24.0.2 and docker-compose version is 1.25.0. I am getting this error.
Can someone help me understand what is wrong and how can I fix this?
答案1
得分: 1
这是翻译后的内容:
这可能是您的DNS出现问题。
打印文件的内容并读取域名服务器IP。
cat /etc/resolv.conf
然后尝试使用以下命令到达该IP:
ping <域名服务器IP>
如果您无法ping通它,请在/etc/resolv.conf
文件的末尾添加另一个域名服务器:
nameserver 8.8.8.8
英文:
It should an issue if your DNS.
Print the content of the file and read the nameserver IP.
cat /etc/resolv.conf
Then try to reach that IP with:
ping <nameserver-ip>
If you're not able to ping it, add end of the /etc/resolv.conf
file another nameserver:
nameserver 8.8.8.8
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论