今天浏览到这篇文档:解决docker: Error response from daemon: Get “https://registry-1.docker.io/v2/“: net/http: request canc-CSDN博客
里面有docker的加速镜像,保存:
{"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"]
}
镜像写在这个文件里:/etc/docker/daemon.json
重启docker命令:
systemctl daemon-reload
systemctl restart docker
配置完成后,可以用以下命令查看是否生效:
docker info | grep -A1 "Registry Mirrors"
或者直接拉取的时候用眼睛观察速度是否有提升!