参考文章:Error response from daemon: Get “https://registry-1.docker.io/v2/“: net/http: request canceled-优快云博客
一、首先配置Dns
sudo vim /etc/resolv.conf
添加
114.114.114.114.
二、修改daemon.json
sudo vim /etc/docker/daemon.json
内容如下:
{
"max-concurrent-downloads": 10,
"max-concurrent-uploads": 5,
"default-shm-size": "1G",
"debug": true,
"experimental": false,
"registry-mirrors":[
"https://x9r52uz5.mirror.aliyuncs.com",
"https://dockerhub.icu",
"https://docker.chenby.cn",
"https://docker.1panel.live",
"https://docker.awsl9527.cn",
"https://docker.anyhub.us.kg",
"https://dhub.kubesre.xyz"
]
}
三、重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker