第六篇:配置Docker容器加速器
阿新 • • 發佈:2018-02-04
systemctl 國內 mon doc 一個 com shadow text 命令 背景說明
鑒於國內網絡穩定問題,到國外站點拉取docker鏡像十分緩慢,故需要配置國內鏡像以便提高鏡像下載速度。
1.使用這個url地址https://account.daocloud.io/signin註冊一個賬號並登錄
2.點擊右上角箭頭標記的加速選項
3.復制下面的命令
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
第六篇:配置Docker容器加速器