Docker中使用163 Hub 鏡像下載加速(Centos 6)

來源:互聯網
上載者:User

標籤:docker hub

在學習Docker的過程中,下載鏡像速度特別慢,這是因為Docker Hub並沒有在國內部署伺服器或者CDN,再加上國內的網速慢等原因,鏡像下載就十分耗時。為了克服跨洋網路延遲,能夠快速高效地下載Docker鏡像,最為有效方式之一就是:使用 國內的Docker鏡像源。下面就介紹一下使用163  鏡像源來加速的辦法。


添加鏡像源:


vim /etc/sysconfig/docker

添加如下內容:


other_args="--registry-mirror=http://hub-mirror.c.163.com"

OPTIONS=‘--registry-mirror=

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


重啟Docker服務:

[[email protected] ~]# /etc/init.d/docker restartStopping docker:                                           [  OK  ]Starting docker:


測試:

[[email protected] ~]# docker search centos

NAME                                   DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED

centos                                 The official build of CentOS.                   2979      [OK]       

jdeathe/centos-ssh                     CentOS-6 6.8 x86_64 / CentOS-7 7.3.1611 x8...   54                   [OK]

nimmis/java-centos                     This is docker images of CentOS 7 with dif...   20                   [OK]

consol/centos-xfce-vnc                 Centos container with "headless" VNC sessi...   16                   [OK]

torusware/speedus-centos               Always updated official CentOS docker imag...   8                    [OK]

egyptianbman/docker-centos-nginx-php   A simple and highly configurable docker co...   6                    [OK]

nathonfowlie/centos-jre                Latest CentOS image with the JRE pre-insta...   5                    [OK]

centos/mariadb55-centos7                                                               3                    [OK]

harisekhon/centos-java                 Java on CentOS (OpenJDK, tags jre/jdk7-8)       2                    [OK]

centos/tools                           Docker image that has systems administrati...   2                    [OK]

timhughes/centos                       Centos with systemd installed and running       1                    [OK]

sgfinans/docker-centos                 CentOS with a running sshd and Docker           1                    [OK]

centos/redis                           Redis built for CentOS                          1                    [OK]

blacklabelops/centos                   CentOS Base Image! Built and Updates Daily!     1                    [OK]

darksheer/centos                       Base Centos Image -- Updated hourly             1                    [OK]

harisekhon/centos-scala                Scala + CentOS (OpenJDK tags 2.10-jre7 - 2...   1                    [OK]

kz8s/centos                            Official CentOS plus epel-release               0                    [OK]

grossws/centos                         CentOS 6 and 7 base images with gosu and l...   0                    [OK]

smartentry/centos                      centos with smartentry                          0                    [OK]

grayzone/centos                        auto build for centos.                          0                    [OK]

vcatechnology/centos                   A CentOS Image which is updated daily           0                    [OK]

ustclug/centos                          USTC centos                                    0                    [OK]

januswel/centos                        yum update-ed CentOS image                      0                    [OK]

repositoryjp/centos                    Docker Image for CentOS.                        0                    [OK]

wenjianzhou/centos                     centos                                          0                    [OK]



650) this.width=650;" src="https://s1.51cto.com/wyfs02/M01/8C/87/wKiom1hvBE7gM5qzAACrMI7eNZ4194.png-wh_500x0-wm_3-wmp_4-s_1472479374.png" title="QQ20170106104309.png" alt="wKiom1hvBE7gM5qzAACrMI7eNZ4194.png-wh_50" />


可以看出下載速度還是很快的!

本文出自 “奔跑的蝸牛” 部落格,請務必保留此出處http://441274636.blog.51cto.com/5054639/1889627

Docker中使用163 Hub 鏡像下載加速(Centos 6)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.