解决 docker 报错 Error response from daemon

直接在浏览器中打开网址 https://registry-1.docker.io/v2/ 连不上,说明网络有问题。
原因是网络连接失败,原因你知道。

加入 dns 配置,修改镜像源

修改配置文件 /etc/docker/daemon.json, Windows 为 C:\Users\用户名\.docker\daemon.json 文件,加入如下内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"dns": [
"8.8.8.8",
"8.8.4.4"
],
"registry-mirrors": [
"https://docker.m.daocloud.io/",
"https://huecker.io/",
"https://dockerhub.timeweb.cloud",
"https://noohub.ru/",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn",
"https://xx4bwyg2.mirror.aliyuncs.com",
"http://f1361db2.m.daocloud.io",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://mirror.ccs.tencentyun.com"
]

重启 docker 服务

Windows 下如果重启无效,可退出 Docker Desktop 再打开。

解决 docker 报错 Error response from daemon

https://coderpan.com/tools/docker-error-registry-1-docker-io-v2.html

作者

CoderPan

发布于

2025-03-18

更新于

2025-09-01

许可协议

评论