拉取镜像报错,Error response from daemon: Get "[https://registry-1.docker.io/v2/":](https://registry-1.docker.io/v2/":) net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
原因:镜像源问题,需更换可用的镜像源
解决办法:
- 打开docker配置文件daemon.json,在CentOs7系统中,该文件路径位于/etc/docker/daemon.json
vim /etc/docker/daemon.json
- 修改镜像源(截止到2024-12-4,该镜像源是有效的)
{
"registry-mirrors": ["https://dockerpull.org","https://docker.unsee.tech/","https://docker.1panel.live/","https://docker.udayun.com/","https://docker.nastool.de/"]
}
- 重启Docker服务
sudo systemctl daemon-reload
sudo systemctl restart docker
- 尝试重新下载镜像,例如下载mysql
docker pull mysql:latest
标签:daemon,io,v2,registry,https,镜像,docker
From: https://www.cnblogs.com/mingcore/p/18585749