docker pull ubuntu

遇到问题如下
Error response from daemon: Get https://registry-1.docker.io/v2/library/ubuntu/manifests/2.04: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&serviceregistry.docker.io: net/http: TLS handshake timeout
说明访问不到镜像源
在这里插入图片描述
解决方式

通过

dig @114.114.114.114 registry-1.docker.io

找到可用IP地址
在这里插入图片描述
然后修改hosts文件

vim /etc/hosts

在这里插入图片描述
添加上橙色划线的一行即可

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐