Docker镜像源修改

原文:https://www.jianshu.com/p/fb70fe704d56

docker默认的源为国外官方源,下载速度较慢,可改为国内,加速

方案一

修改或新增 /etc/docker/daemon.json

# vi /etc/docker/daemon.json

{

"registry-mirrors": ["http://hub-mirror.c.163.com"]

}

systemctl restart docker.service

方案二

修改或新增 /etc/sysconfig/docker,在OPTIONS变量后追加参数  --registry-mirror=https://docker.mirrors.ustc.edu.cn

# vi /etc/sysconfig/docker

OPTIONS='--selinux-enabled --log-driver=journald --registry-mirror=https://docker.mirrors.ustc.edu.cn'

Docker国内源说明:

Docker 官方中国区

https://registry.docker-cn.com

网易

http://hub-mirror.c.163.com

中国科技大学

https://docker.mirrors.ustc.edu.cn

阿里云

https://pee6w651.mirror.aliyuncs.com

 
 


作者:Superwind20
链接:https://www.jianshu.com/p/fb70fe704d56
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
原文地址:https://www.cnblogs.com/wangmo/p/15147631.html