docker pull的时候报错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)
解决办法
1.配置加速地址
vi /etc/docker/daemon.json
2.添加以下内容
{
"registry-mirrors": ["https://docker.1panel.live"]
}
或者
{
"registry-mirrors": [
"https://docker.211678.top",
"https://docker.1panel.live",
"https://hub.rat.dev",
"https://docker.m.daocloud.io",
"https://do.nark.eu.org",
"https://dockerpull.com",
"https://dockerproxy.cn",
"https://docker.awsl9527.cn"
]
}
或者
{
"registry-mirrors": ["https://docker.m.daocloud.io"]
}
或者
{
"registry-mirrors": [
"https://registry.cn-hangzhou.aliyuncs.com",
"https://swr.cn-north-4.myhuaweicloud.com",
"https://mirror.ccs.tencentyun.com"
],
"dns": ["8.8.8.8", "8.8.4.4"],
"runtimes": {
"nvidia": {
"args": [],
"path": "nvidia-container-runtime"
}
}
}
3.然后保存
:wq
4.重启docker
systemctl daemon-reload
systemctl restart docker