使用阿里云容器Hub加速Docker镜像下载
2016-12-27 11:35
1001 查看
阿里云的镜像服务做得不错,包括常用的Debian(Ubuntu)和RedHat(CentOS)的镜像,各类开源软件的repo,以及docker的Container镜像,全部copy了一份在国内服务器上。下载速度就不再受限于你懂的大防火墙。系统及各类开源软件的备份直接看http://mirrors.aliyun.com/,下面单独说下Docker Hub在阿里的镜像加速器设置,以CentOS7为例。
登录阿里云开发者平台http://dev.aliyun.com/,进入加速器页面:
首先你得安装Docker Engine,根据Docker官网安装即可。阿里这里给出的配置步骤就是更改下Docker Daemon的参数,可以直接修改Docker服务配置文件/usr/lib/systemd/system/docker.service。要是使用版本1.12的话,Docker Daemon执行文件名有点不一样。
根据dockerd的--registry-mirror参数来修改。
修改之后再 重启docker服务:
# systemctl daemon-reload
# systemctl restart docker之后的执行docker pull xxx 时速度那是杠杠的。
登录阿里云开发者平台http://dev.aliyun.com/,进入加速器页面:
首先你得安装Docker Engine,根据Docker官网安装即可。阿里这里给出的配置步骤就是更改下Docker Daemon的参数,可以直接修改Docker服务配置文件/usr/lib/systemd/system/docker.service。要是使用版本1.12的话,Docker Daemon执行文件名有点不一样。
# docker version Client: Version: 1.12.5 API version: 1.24 Go version: go1.6.4 Git commit: 7392c3b Built: Fri Dec 16 02:23:59 2016 OS/Arch: linux/amd64 Server: Version: 1.12.5 API version: 1.24 Go version: go1.6.4 Git commit: 7392c3b Built: Fri Dec 16 02:23:59 2016 OS/Arch: linux/amd64
根据dockerd的--registry-mirror参数来修改。
# dockerd --help | grep registry --disable-legacy-registry Disable contacting legacy registries --insecure-registry=[] Enable insecure registry communication --registry-mirror=[] Preferred Docker registry mirror
# vim /usr/lib/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network.target [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd --registry-mirror=https://jnxt8d8b.mirror.aliyuncs.com #更改这里
修改之后再 重启docker服务:
# systemctl daemon-reload
# systemctl restart docker之后的执行docker pull xxx 时速度那是杠杠的。
相关文章推荐
- 克服跨洋网络延迟,使用Docker Hub Mirror加速Docker官方镜像下载
- 克服跨洋网络延迟,使用Docker Hub Mirror加速Docker官方镜像下载
- docker 镜像下载慢使用阿里云加速的详细流程
- 克服跨洋网络延迟,使用Docker Hub Mirror加速Docker官方镜像下载
- 克服跨洋网络延迟,使用Docker Hub Mirror加速Docker官方镜像下载
- docker学习笔记04:Centos7使用阿里云镜像加速
- 使用阿里云Docker镜像加速
- docker使用阿里云Docker镜像库加速
- Docker使用阿里云docker镜像加速
- docker使用阿里云Docker镜像库加速
- docker使用阿里云Docker镜像库加速
- 详解docker使用阿里云Docker镜像库加速(修订版)
- Docker使用阿里云docker镜像加速
- 详解docker使用阿里云Docker镜像库加速(修订版)
- 使用DaoCloud加速docker镜像下载——修改daemon.json遇到的问题
- Docker 使用阿里云镜像库加速
- docker使用阿里云Docker镜像库加速
- 使用阿里云Docker镜像加速
- 使用阿里云Docker镜像加速