当前位置: 代码网 > 服务器>服务器>云虚拟主机 > docker pull镜像失败问题解决方法

docker pull镜像失败问题解决方法

2024年10月28日 云虚拟主机 我要评论
@[toc](error response from daemon: get “https://registry-1.docker.io/v2/”: net/http: req

@[toc](error response from daemon: get “https://registry-1.docker.io/v2/”: net/http: request canceled while waiting for connection (client.timeout exceeded while awaiting headers)")

还有下边这两个问题的尝试解决办法

error response from daemon: get "https://index.docker.io/v1/search?q=mysql&n=25

1.更改镜像加速地址

vim  /etc/docker/daemon.json
{
    "registry-mirrors": [
        "https://do.nark.eu.org",
        "https://dc.j8.work",
        "https://docker.m.daocloud.io",
        "https://dockerproxy.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://docker.nju.edu.cn"
    ]
}
重启docker
systemctl restart docker

2.添加dns

vim  /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
重启docker
systemctl restart docker

到此这篇关于docker pull镜像失败问题解决尝试的文章就介绍到这了,更多相关docker pull镜像失败内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com