Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/

不念不忘少年蓝@ 2023-07-13 13:44 103阅读 0赞

昨天刚刚配置好虚拟机上的docker,docker可以成功的将镜像上传到阿里云,但今天就始终不行,报下面的错误:

Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: Get https://dockerauth.cn-hangzhou.aliyuncs.com/auth?account=ppmicro&client\_id=docker&offline\_token=true&service=registry.aliyuncs.com%3Acn-hangzhou%3A26842: dial tcp: lookup dockerauth.cn-hangzhou.aliyuncs.com on 61.139.2.69:53: dial tcp 61.139.2.69:53: i/o timeout
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/ppmicro/exam]
e776ab8d046e: Retrying in 2 seconds
a78b79a93bab: Preparing
ceaf9e1ebef5: Preparing
9b9b7f3d56a0: Preparing
f1b5933fe4b5: Preparing

网上查找了一下,配置insecure-registries不行。

[root@147 appbuild]# cat /etc/docker/daemon.json
{ “insecure-registries”:[“registry.cn-hangzhou.aliyuncs.com”]

再试验在daemon.json中配置dns为8.8.8.8,也不行。

最后

vim /etc/resolv.conf

将dns修改为8.8.8.8 才可以。

  1. # Generated by NetworkManager
  2. nameserver 8.8.8.8

发表评论

表情:
评论列表 (有 0 条评论,103人围观)

还没有评论,来说两句吧...

相关阅读