先到 https://cr.console.aliyun.com/ 注册一下
登录成功后,在控制台,看左侧
有一个“dockerhub镜像站点”按钮,点开找到自己的专属加速链接,我的是 https://olxmv577.mirror.aliyuncs.com
然后vi /etc/sysconfig/docker
最下面增加一行: other_args="--registry-mirror=https://olxmv577.mirror.aliyuncs.com"
如果是centos7, 需要修改OPTIONS那一行,在最后面加上"--registry-mirror=https://olxmv577.mirror.aliyuncs.com"
我的内容是这样的:
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --registry-mirror=https://olxmv577.mirror.aliyuncs.com'
然后就是重启一下docker就ok了,测试发现速度杠杠的。
编辑回复