编程语言
首页 > 编程语言> > Python - 装机系列63 docker镜像不通 no such host

Python - 装机系列63 docker镜像不通 no such host

作者:互联网

说明

主要的问题大概是我的两台电脑连到了一个交换机,交换机再连到路由器,导致dns出问题

内容

故障现象

Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: dial tcp: lookup registry.cn-hangzhou.aliyuncs.com: no such host

解决方法:

vim /etc/resolv.conf

#nameserver 127.0.0.53
nameserver 223.5.5.5
options edns0

把默认的dns设置改为阿里云的dns,保存即生效

docker pull IMAGE:version

...
ffe240a3dce3: Already exists
2ddf521b57cf: Already exists
570bf33478f0: Pull complete
Digest: sha256:ed92bdc4ed598e7c2c130f4301c907e5e3bfe8f3e16ffcd90bf83e1368e5b941

标签:aliyuncs,cn,exists,no,Python,hangzhou,dns,such
来源: https://blog.csdn.net/yukai08008/article/details/121512212