Docker - 配置DaoCloud的Docker加速器
由于众所周知的原因,从Docker Hub难以高效地下载镜像。
除了使用VPN或代理之外,最为有效的方式就是使用Docker国内镜像。
DaoCloud是首个提供国内免费Docker Hub镜像的团体,可以使用DaoCloud团队提供的Docker Hub Mirror服务。
Docker加速器简介
Docker加速器是 DaoCloud 推出的 Docker Hub Mirror 服务的官方名称。
Docker加速器提供Docker Registry(Docker Hub)在中国的镜像代理服务,为中国用户在国内服务器上缓存诸多镜像。
当用户的Docker设定了--registry-mirror参数后,用户的Docker拉取镜像时,首先去Docker加速器中查找镜像,若命中则说明该镜像已经在Docker加速器中缓存,用户直接从Docker加速器中下载。
若没有命中,则说该镜像还没有被缓存,那么Docker加速器首先会被驱使去Docker Hub中下载该镜像,并进行缓存,最终让用户从Docker加速器中下载该镜像。
Docker加速器使用说明
在DaoCloud注册并登录。
在登录后的页面(https://dashboard.daocloud.io/),点击“加速器”标签,根据新弹出的页面中“配置 Docker 加速器”信息,更改自己的 Docker 配置文件,然后重启Docker,使之生效。
注意:此时,从“配置 Docker 加速器”信息中,我们其实已经得到一个免费的docker镜像地址,类似于“http://abcd1234.m.daocloud.io”。
示例:配置及使用Docker加速器
这里以Linux系统为例。
Linux
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://abcd1234.m.daocloud.io
该脚本可以将 --registry-mirror 加入到你的 Docker 配置文件中。
适用于 Ubuntu14.04、Debian、CentOS6 、CentOS7、Fedora、Arch Linux、openSUSE Leap 42.1,其他版本可能有细微不同。
注意:将http://abcd1234.m.daocloud.io替换为实际的链接。
更多详情请访问文档
配置Docker加速器
[root@CentOS-7 ~]# uname -a
Linux CentOS-7 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@CentOS-7 ~]#
[root@CentOS-7 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@CentOS-7 ~]#
[root@CentOS-7 ~]# curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://abcd1234.m.daocloud.io
Success.
You need to restart docker to take effect: sudo systemctl restart docker
[root@CentOS-7 ~]#
[root@CentOS-7 ~]# systemctl restart docker
[root@CentOS-7 ~]#
使用Docker加速器拉取镜像
[root@CentOS-7 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@CentOS-7 ~]#
[root@CentOS-7 ~]# docker run ubuntu
Unable to find image 'ubuntu:latest' locally
Trying to pull repository docker.io/library/ubuntu ...
latest: Pulling from docker.io/library/ubuntu
b3e1c725a85f: Pull complete
4daad8bdde31: Pull complete
63fe8c0068a8: Pull complete
4a70713c436f: Pull complete
bd842a2105a8: Pull complete
Digest: sha256:dbe36a89ad8daf8bbd2a68f14eab18b969d3f125104da51df6337bbf08d1c8ae
Status: Downloaded newer image for docker.io/ubuntu:latest
[root@CentOS-7 ~]#
[root@CentOS-7 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/ubuntu latest 104bec311bcd 8 days ago 128.9 MB
[root@CentOS-7 ~]#
Docker - 配置DaoCloud的Docker加速器的更多相关文章
- Docker - 配置DaoCloud的Docker加速器(国内registry-mirror)
由于众所周知的原因,从Docker Hub难以高效地下载镜像. 除了使用VPN或代理之外,最为有效的方式就是使用Docker国内镜像. DaoCloud是首个提供国内免费Docker Hub镜像的团体 ...
- Docker配置daocloud加速器
首先注册daocloud网站的账号(免费的!!!),并登陆自己的账号,并在这里获取自己的daocloud加速器配置脚本. 获取到自己的daocloud加速器配置脚本之后只需要在已安装Docker服务的 ...
- Docker 配置阿里云镜像加速器
由于国内访问直接访问docker hub网速比较慢,拉取镜像的时间就会比较长.一般我们会使用镜像加速或者直接从国内的一些平台镜像仓库上拉取. 根据网上提供的方案,有网易,daocloud,ustc等解 ...
- CentOS6.8上Docker配置阿里云镜像加速器
1.打开网站https://dev.aliyun.com,点击管理中心,登录阿里云账号(没有的可以注册,也可以用淘宝等第三方账号登录). 2.点击镜像加速器,复制加速器地址 3.配置本机Docker运 ...
- Docker配置阿里云镜像加速器及开启远程连接
适用于CentOS-7版本 mkdir /etc/docker vim /etc/docker/deamon.json 添加以下内容配置镜像 { "registry-mirrors" ...
- Linux系统Docker配置阿里云镜像加速器
vim /etc/docker/daemon.json # 替换为 "registry-mirrors": ["https://v2ltjwbg.mirror.aliyu ...
- Docker 配置国内镜像加速器,加速下载速度
文章首发自个人微信公众号:小哈学Java 个人网站地址:https://www.exception.site/docker/docker-configuration-of-mirror-acceler ...
- centos为docker配置加速器
国内拉去docker镜像慢得可怜,为了解决这个问题,可为docker配置加速器. 1.修改daemon配置文件 sudo mkdir -p /etc/dockervim /etc/docker/dae ...
- 为docker配置国内镜像加速器
docker官方镜像仓库地址为:https://hub.docker.com/search?q=&type=image 因为是国外地址,因此下载镜像时速度很慢. 我们需要配置国内镜像加速, 可 ...
随机推荐
- IntelliJ IDEA——SVN的配置及使用
服务端:VisualSVN-Server-3.9.1-x64 下载地址:https://www.visualsvn.com/server/download/ TortoiseSVN 安装 下载地址:h ...
- myeclise 安装
安装.破解步骤都在gaobo百度云/工具/开发工具 安装后配置环境变量:
- Spring获取bean工具类,可用于在线程里面获取bean
Spring获取bean工具类,可用于在线程里面获取bean import java.util.Locale; import org.springframework.beans.BeansExcept ...
- easyui多图片上传+预览切换+支持IE8
引入css和js: <link href="${pageContext.request.contextPath}/plugin/dialog/dialog.css" rel= ...
- TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations'
错误: TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations' 参照https://blog.c ...
- TZOJ 2099 Sightseeing tour(网络流判混合图欧拉回路)
描述 The city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so that to ...
- elementui上传文件
<el-form-item label="上传附件"> <transition name="fade"> <el-upload r ...
- vs2015调试断点无法命中
问题描述: 我是从vc6.0的原工程导入的,用vs2015编译,在断点调试的时候遇到问题,断点无法命中; 修改方法:工程->属性->C/C++ 常规->调试信息格式->设置为C ...
- 【ElasticSearch】 安装
Elasticsearch简介 Elasticsearch 是一个开源的分布式 RESTful 搜索和分析引擎,能够解决越来越多不同的应用场景 官网地址:https://www.elastic.co ...
- O365 Manager Plus帮助台委派介绍
O365 Manager Plus帮助台委派介绍 虽然Office 365允许您在全球任何地方工作,但它提供的管理功能十分不足.当一个组织分布在多个国家/地区时,一个管理员很难单独管理所有用户和邮箱. ...