【错误解决】docker拉不到镜像:Error response from daemon: Get https://index.docker.io/v1/search

本文介绍了解决Docker在尝试搜索或拉取镜像时遇到连接被拒绝错误的方法。通过修改resolv.conf文件添加Google的DNS服务器,并重启Docker服务,最终成功从Docker Hub上拉取了busybox镜像。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[root@k8smaster ~]# docker search busybox
Error response from daemon: Get https://index.docker.io/v1/search?q=busybox&n=25: dial tcp: lookup index.docker.io on [::1]:53: read udp [::1]:44869->[::1]:53: read: connection refused

解决办法:

[root@k8smaster ~]# vim /etc/resolv.conf

#add these lines on top and above one for home router…
nameserver 8.8.8.8
nameserver 8.8.4.4

sudo systemctl daemon-reload
sudo systemctl restart docker
sudo systemctl status docker

[root@k8smaster ~]# docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
24fb2886d6f6: Pull complete
Digest: sha256:52f73a0a43a16cf37cd0720c90887ce972fe60ee06a687ee71fb93a7ca601df7
Status: Downloaded newer image for busybox:latest
docker.io/library/busybox:latest

成功拉取镜像!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

安安csdn

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值