当前位置: 首页> 娱乐> 明星 > Docker pull镜像一直在Waiting无法下载,根本解决方法

Docker pull镜像一直在Waiting无法下载,根本解决方法

时间:2025/7/18 6:39:43来源:https://blog.csdn.net/ytp552200ytp/article/details/139514548 浏览次数:0次

1、现象描述:

docker pull 拉去镜像一直在等待,无法下载,最后失败如下:

[root@localhost docker]# docker pull zookeeper
Using default tag: latest
latest: Pulling from library/zookeeper
2ec76a50fe7c: Retrying in 1 second
fab7f202453a: Retrying in 1 second
ee59ca42def8: Retrying in 1 second
2ce2282f972f: Waiting
d2a9e456ba82: Waiting
b59edc04016d: Waiting
1e52b217ebb4: Waiting
7a5027dbe828: Waiting
4f4fb700ef54: Waiting
8e018b2f6fcb: Waiting
error pulling image configuration: download failed after attempts=6: dial tcp 199.59.148.246:443: connect: connection refused

2、现象分析:

经排查分析:

  •        原因1:服务器DNS无法解析
  •        原因2:docker 源有问题

3、解决方法:

3.1、配置并更新DNS

以CentOS7为例,直接操作哦:

vi /etc/sysconfig/network-scripts/ifcfg-eth0
DNS1=223.5.5.5
DNS2=223.6.6.6vi /etc/resolv.conf
nameserver 223.5.5.5
nameserver 223.6.6.6
nameserver 8.8.8.8systemctl restart network###测试一下 是否联通
ping  223.5.5.5

3.2、更新docker源,换成国内源

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://mirror.ccs.tencentyun.com/"]
}
EOFsudo systemctl daemon-reload
sudo systemctl restart docker

3.3、同步时间

####需安装ntp, 自行搜ntpdate ntp1.aliyun.com

4、结果如下,6得很

[root@localhost docker]# docker pull zookeeper
Using default tag: latest
latest: Pulling from library/zookeeper
a2abf6c4d29d: Pull complete
2bbde5250315: Pull complete
202a34e7968e: Pull complete
4e4231e30efc: Pull complete
707593b95343: Pull complete
b070e6dedb4b: Pull complete
46e5380f3905: Pull complete
8b7e330117e6: Pull complete
Digest: sha256:2c8c5c2db6db22184e197afde13e33dad849af90004c330f20b17282bcd5afd7
Status: Downloaded newer image for zookeeper:latest
docker.io/library/zookeeper:latest

关键字:Docker pull镜像一直在Waiting无法下载,根本解决方法

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: