✅问题描述
记录一个bug,最近重装下腾讯云服务器后,发现docker拉去镜像超时拉去不下来,报错如下:
error pulling image configuration: download failed after attempts=6: dial tcp 47.88.58.234:443: connect: connection refused
✅解决
设置国内镜像
1.创建/etc/docker目录
sudo mkdir -p /etc/docker
2.创建docker镜像配置文件
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
"https://ox288s4f.mirror.aliyuncs.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://mirror.ccs.tencentyun.com"
]
}
EOF
3.重启
sudo systemctl daemon-reload
sudo systemctl restart docker
或者
sudo service docker restart