参考:https://www.cnblogs.com/icebutterfly/p/9489133.html
使用docker拉取镜像时,会出现链接超时错误。因为官方镜像访问速度太慢,所以报错,修改为国内镜像可以解决这个问题,操作如下:
在linux系统上,修改 /etc/docker/daemon.json 文件配置
执行命令,进入daemon.json配置文件
vim /etc/docker/daemon.json
修改配置文件为(可自行加减国内镜像地址),然后保存
{
"registry-mirrors": [
"http://hub-mirror.c.163.com",
"https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn"
]
}
执行命令,重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker