Docker
报错:
docker: Error response from daemon: Get “https://registry-1.docker.io/v2/”: context deadline exceeded
这个错误表明Docker客户端尝试访问Docker Hub或其他Docker注册中心时出现了问题。具体来说,是在尝试获取注册中心API的响应时遇到了错误。可能的原因包括网络问题、认证问题、注册中心URL不正确或者注册中心服务本身不可用。
解决办法:
1.检查网络连接
确保你的机器可以访问互联网,特别是Docker Hub或你所使用的私有注册中心。
2.检查Docker服务状态
Linux系统查看Docker服务是否正在运行:
systemctl status docker
3.如以上都没有问题,下面考虑docker换源:
换源
sudo mkdir -p /etc/docker
进入/etc/docker/daemon.json文件
gedit /etc/docker/daemon.json
在里面加入下面的配置
{
"registry-mirrors" : ["https://docker.registry.cyou",
"https://docker-cf.registry.cyou",
"https://dockercf.jsdelivr.fyi",
"https://docker.jsdelivr.fyi",
"https://dockertest.jsdelivr.fyi",
"https://mirror.aliyuncs.com",
"https://dockerproxy.com",
"https://mirror.baidubce.com",
"https://docker.m.daocloud.io",
"https://docker.nju.edu.cn",
"https://docker.mirrors.sjtug.sjtu.edu.cn",
"https://docker.mirrors.ustc.edu.cn",
"https://mirror.iscas.ac.cn",
"https://docker.rainbond.cc",
"https://do.nark.eu.org",
"https://dc.j8.work",
"https://dockerproxy.com",
"https://gst6rzl9.mirror.aliyuncs.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"http://mirrors.ustc.edu.cn/",
"https://mirrors.tuna.tsinghua.edu.cn/",
"http://mirrors.sohu.com/"
],
"insecure-registries" : [
"registry.docker-cn.com",
"docker.mirrors.ustc.edu.cn"
],
"debug": true,
"experimental": false
}
重载生效
sudo systemctl daemon-reload
重启服务
sudo systemctl restart docker
查看是否配置成功
docker info
原文: link