docker pull nginx 下载镜像超时了
error pulling image configuration: download failed after attempts=6: dial tcp 111.243.214.168:443: i/o timeout
解决:
添加自己的阿里云镜像加速器 https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
在linux服务器路径/etc/docker找到daemon.json文件,没有就新建一个
添加配置
{
"registry-mirrors": ["https://plqfzic9.mirror.aliyuncs.com"]
}
或者控制台直接执行语句
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://plqfzic9.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
最后要执行
sudo systemctl daemon-reload
sudo systemctl restart docker
添加之后效果:
成功下载!
后续增加地址
{
"registry-mirrors": [
"https://do.nark.eu.org",
"https://dc.j8.work",
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn"
]
}