docker pull拉取镜像时候显示i/o timeout
在服务器上拉取portainer镜像显示
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/5f/5f11582196a42b895cdb9322f7a650f42a0c1ed062efc71864352f314228a187/data?verify=1687310174-aZpHSUCSmELgEz7PAoh2pTljiC4%3D: dial tcp 104.18.122.25:443: i/o timeout
原因是因为拉取镜像时候超时了
需要在/etc/docker/daemon.json文件里添加国内和国外镜像加速
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://yxzrazem.mirror.aliyuncs.com",
"http://hub-mirror.c.163.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn"
],
"log-driver": "json-file",
"log-opts": {"max-size": "1024m","max-file": "3"},
"insecure-registries": ["192.168.1.55:88"]
}
需注意:"insecure-registries": ["192.168.1.55:88"]
这个配置是因为我在服务器上安装了harbor,所以会有这个
如果你的服务器上没有安装harbor,则可以把这行给删掉
而上面这些都是配置加速的
"https://yxzrazem.mirror.aliyuncs.com",
"http://hub-mirror.c.163.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn"