先安装依赖:yum install -y yum-utils device-mapper-persistent-data lvm2 wget
参考文章:http://www.ty2y.com/study/centos7.5azdockerjc.html
配置镜像加速器:
https://dxvqyw5j.mirror.aliyuncs.com
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/","https://hub-mirror.c.163.com/","https://reg-mirror.qiniu.com","https://dxvqyw5j.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
检查加速器是否生效配置加速器之后,如果拉取镜像仍然十分缓慢,请手动检查加速器配置是否生效,在命令行执行 docker info,如果从结果中看到了如下内容,说明配置成功。
docker info | grep "Registry Mirrors" -A3