设置docker镜像加速地址
设置镜像加速地址
1、 docker国内镜像主要有:
docker中国区官方镜像 https://registry.docker-cn.com //不需要注册直接使用
网易 http://hub-mirror.c.163.com //不需要注册直接使用
阿里镜像 https://xxxx.mirror.aliyuncs.com //需要注册
DaoCloud http://xxxx.m.daocloud.ip //需要注册
2、登录阿里云控制台(推荐)
https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
3、设置自己的镜像加速地址
sudo tee /etc/docker/daemon.json <<-'EOF'
#写入地址
{
"registry-mirrors": ["https://你的镜像地址"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker