Docker中使用163 Hub 镜像下载加速(Centos 6)
2017-01-06 10:44
525 查看
在学习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服务:
测试:
[root@iZ25syqr8e5Z ~]# 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]
可以看出下载速度还是很快的!
添加镜像源:
vim /etc/sysconfig/docker
添加如下内容:
other_args="--registry-mirror=http://hub-mirror.c.163.com"
OPTIONS='--registry-mirror= http://hub-mirror.c.163.com'
重启Docker服务:
[root@iZ25syqr8e5Z ~]# /etc/init.d/docker restart Stopping docker: [ OK ] Starting docker:
测试:
[root@iZ25syqr8e5Z ~]# 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]
可以看出下载速度还是很快的!
相关文章推荐
- 使用Dockerfile创建带Apache服务的Centos Docker镜像
- docker 使用centos 镜像 运行 javaweb ,并重新生成镜像
- 【Dockerfile】使用Dockerfile创建带nginx服务的Centos Docker镜像
- 【系列2】使用Dockerfile创建带Apache服务的Centos Docker镜像
- Docker实战:使用Dockerfile创建带Apache服务并支持ssh的Centos Docker镜像
- 使用supermin制作CentOS的Docker镜像
- 详解使用Dockerfile创建带Apache服务的CentOS Docker镜像
- Docker在Centos下使用Dockerfile构建远程Tomcat和Jenkins镜像
- docker 使用centos 镜像 运行 javaweb ,并重新生成镜像
- 使用Dockerfile创建带Apache服务的Centos Docker镜像
- 【Docker江湖】之hub上镜像的使用,Dockerfile语法解读和数据管理
- docker使用centos镜像
- xen安装CentOS虚拟机(使用163镜像)
- CentOS 7 更新源 – 使用国内 163 yum 源 [日期:2015-09-22] 来源:imcn.me 作者:Linux [字体:大 中 小] 突然想起试试 Docker,在一台计算机上
- 克服跨洋网络延迟,使用Docker Hub Mirror加速Docker官方镜像下载
- 使用阿里云容器Hub加速Docker镜像下载
- xen安装CentOS虚拟机(使用163镜像)
- 克服跨洋网络延迟,使用Docker Hub Mirror加速Docker官方镜像下载
- Docker实战:使用Dockerfile创建带nginx服务并支持ssh的Centos Docker镜像
- Docker中使用CentOS7镜像