docker的镜像加速器,有很多的配置方法,其中最为常见的有docker cn、阿里云加速器、中国科技大学
1、docker cn 加速器
[root@localhost ~]# mkdir -p /etc/docker
[root@localhost ~]# sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
EOF
2、阿里云加速器
① 注册阿里云账号
,专用加速器地址获得路径:
https://cr.console.aliyun.com/
#/accelerator
在浏览器里面输入aliyun.com--->
点击免费注册
点击控制台——>产品与服务——>弹性计算——>容器镜像管理
看到自己专有的镜像加速器:
② 添加加速器到配置文件
根据官方文档进行配置
[root@localhost ~]# cd /etc/docker/
[root@localhost docker]# ls
certs.d daemon.json seccomp.json
[root@localhost docker]# tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://rvq9mjyt.mirror.aliyuncs.com"] }
EOF
[root@localhost docker]# systemctl daemon-reload
[root@localhost docker]# systemctl restart docker