Docker中使用163 Hub 镜像下载加速(Centos 6)
在学习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服务:
# /etc/init.d/docker restart
Stopping docker:
Starting docker:
测试:
# docker search centos
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
centos The official build of CentOS. 2979
jdeathe/centos-ssh CentOS-6 6.8 x86_64 / CentOS-7 7.3.1611 x8... 54
nimmis/java-centos This is docker images of CentOS 7 with dif... 20
consol/centos-xfce-vnc Centos container with "headless" VNC sessi... 16
torusware/speedus-centos Always updated official CentOS docker imag... 8
egyptianbman/docker-centos-nginx-php A simple and highly configurable docker co... 6
nathonfowlie/centos-jre Latest CentOS image with the JRE pre-insta... 5
centos/mariadb55-centos7 3
harisekhon/centos-java Java on CentOS (OpenJDK, tags jre/jdk7-8) 2
centos/tools Docker image that has systems administrati... 2
timhughes/centos Centos with systemd installed and running 1
sgfinans/docker-centos CentOS with a running sshd and Docker 1
centos/redis Redis built for CentOS 1
blacklabelops/centos CentOS Base Image! Built and Updates Daily! 1
darksheer/centos Base Centos Image -- Updated hourly 1
harisekhon/centos-scala Scala + CentOS (OpenJDK tags 2.10-jre7 - 2... 1
kz8s/centos Official CentOS plus epel-release 0
grossws/centos CentOS 6 and 7 base images with gosu and l... 0
smartentry/centos centos with smartentry 0
grayzone/centos auto build for centos. 0
vcatechnology/centos A CentOS Image which is updated daily 0
ustclug/centos USTC centos 0
januswel/centos yum update-ed CentOS image 0
repositoryjp/centos Docker Image for CentOS. 0
wenjianzhou/centos centos 0
可以看出下载速度还是很快的!
页:
[1]