1、问题:
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)
2、解决
① 进入/etc/docker
目录下,命令如下:
cd /etc/docker
② 编辑daemon.json
文件
vi daemon.json
将内容修改为如下内容:
{"registry-mirrors": ["http://hub.xdark.top","http://hub.littlediary.cn","http://dockerpull.org","http://hub.crdz.gq","http://docker.1panel.live","http://docker.unsee.tech","http://docker.m.daocloud.io","http://docker.kejilion.pro","http://registry.dockermirror.com","http://hub.rat.dev","http://dhub.kubesre.xyz","http://docker.nastool.de","http://docker.udayun.com","http://docker.rainbond.cc","http://hub.geekery.cn","http://docker.1panelproxy.com"]
}
使用了国内镜像后docker search
还是不能使用,但是docker pull
可以正常使用。