标签:技术 you docker容器 type https reg 下载 ubunt 分享
背景说明鉴于国内网络稳定问题,到国外站点拉取docker镜像十分缓慢,故需要配置国内镜像以便提高镜像下载速度。
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://ce802703.m.daocloud.io
[root@docker ~]# curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://ce802703.m.daocloud.io
docker version >= 1.12
{"registry-mirrors": ["http://ce802703.m.daocloud.io"]}
Success.
You need to restart docker to take effect: sudo systemctl restart docker
[root@docker ~]# systemctl restart docker
[root@docker ~]#
该脚本可以将 --registry-mirror 加入到你的 Docker 配置文件 /etc/docker/daemon.json 中。适用于 Ubuntu14.04、Debian、CentOS6 、CentOS7、Fedora、Arch Linux、openSUSE Leap 42.1
标签:技术 you docker容器 type https reg 下载 ubunt 分享
原文地址:http://blog.51cto.com/liuleis/2068629