docker之解决下载镜像速度慢的三种方式

针对于centos7操作系统

第一种方式:使用国内镜像源

在/etc/docker/daemon.json中的{}添加:

  "registry-mirrors": ["https://registry.docker-cn.com"]

第二种方式:使用阿里云镜像加速

(1)首先去阿里云网站上进行注册:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

(2)注册完成后搜索:容器镜像服务,在左下角找到

将大括号里面的复制到/etc/docker/daemon.json中的大括号中。

然后在终端输入:

sudo systemctl daemon-reload

sudo systemctl restart docker

第三种方式:使用DaoCloud进行加速,没去捣鼓这种,需要的可以去看一下。

推荐使用阿里云加速,主需要注册就可以了,简单,方便。

原文地址:https://www.cnblogs.com/xiximayou/p/12273378.html