Docker / Kubernetes 镜像源

Azure 中国镜像源地址:http://mirror.azure.cn/
Azure 中国镜像源 Github 地址:https://github.com/Azure/container-service-for-azure-china
镜像源配置说明:http://mirror.azure.cn/help/gcr-proxy-cache.html
中科大镜像源地址:http://mirrors.ustc.edu.cn/
中科大镜像源 Github 地址:https://github.com/ustclug/mirrorrequest
镜像源配置说明:https://github.com/ustclug/mirrorrequest/issues/187
使用镜像源加速 Docker.io 镜像仓库
如果在 Docker 官方仓库拉取的是官方镜像,拉取方法类似如下:
$ docker pull xxx:yyy
使用中科大镜像源,应该类似这样拉取:
$ docker pull docker.mirrors.ustc.edu.cn/library/xxx:yyy
使用 Azure 中国镜像源,应该类似这样拉取:
$ docker pull dockerhub.azk8s.cn/library/xxx:yyy
如果在 Docker 官方仓库拉取的镜像是私有仓库
拉取方法类似如下:
$ docker pull xxx/yyy:zz
使用中科大镜像源,应该类似这样拉取:
$ docker pull docker.mirrors.ustc.edu.cn/xxx/yyy:zz
使用 Azure 中国镜像源,应该类似这样拉取:
$ docker pull dockerhub.azk8s.cn/xxx/yyy:zz
- 演示一个使用镜像源拉取的实例
# 使用中科大镜像源 $ docker pull docker.mirrors.ustc.edu.cn/library/mysql:5.7
$ docker pull docker.mirrors.ustc.edu.cn/360cloud/wayne
# 使用 Azure 中国镜像源 $ docker pull dockerhub.azk8s.cn/library/mysql:5.7
$ docker pull dockerhub.azk8s.cn/360cloud/wayne
注:首次拉取时可能会有 Error:image library/mysql:5.7 not found 类似报错,这说明镜像源中没有缓存该镜像。这个属于正常现像,因为加速镜像都是先从官方镜像仓库进行拉取的,然后缓存到本地。遇到这种情况,你可以尝试多拉取几次即可。
使用镜像源加速 gcr.io 镜像仓库
- 如果拉取的 Google 镜像仓库中容器镜像类似如下:
$ docker pull gcr.io/xxx/yyy:zzz 使用中科大镜像源,应该类似这样拉取:
$ docker pull gcr.mirrors.ustc.edu.cn/xxx/yyy:zzz 使用 Azure 中国镜像源,应该类似这样拉取:
$ docker pull gcr.azk8s.cn/xxx/yyy:zzz
- 演示一个使用镜像源拉取的实例
下面我们以拉取 gcr.io/kubernetes-helm/tiller:v2.9.1 为例: # 使用中科大镜像源
$ docker pull gcr.mirrors.ustc.edu.cn/kubernetes-helm/tiller:v2.9.1 # 使用 Azure 中国镜像源
$ docker pull gcr.azk8s.cn/kubernetes-helm/tiller:v2.9.1
使用镜像源加速 k8s.gcr.io 镜像仓库
- 如果我们拉取的 Kubernetes 所需容器镜像类似以下形式:
$ docker pull k8s.gcr.io/xxx:yyy
# 相当于$ docker pull gcr.io/google-containers/xxx:yyy 使用中科大镜像源,应该类似这样拉取:
$ docker pull gcr.mirrors.ustc.edu.cn/google-containers/xxx:yyy 使用 Azure 中国镜像源,应该类似这样拉取:
$ docker pull gcr.azk8s.cn/google-containers/xxx:yyy
- 演示一个使用镜像源拉取的实例
# 使用中科大镜像源
$ docker pull gcr.mirrors.ustc.edu.cn/google-containers/addon-resizer:1.8.
# 使用 Azure 中国镜像源
$ docker pull gcr.azk8s.cn/google-containers/addon-resizer:1.8.
使用镜像源加速 quay.io 镜像仓库
- 如果我们拉取的 quay.io 下所需容器镜像类似以下形式:
$ docker pull quay.io/xxx/yyy:zzz 使用中科大镜像源,应该类似这样拉取:
$ docker pull quay.mirrors.ustc.edu.cn/xxx/yyy:zzz 使用 Azure 中国镜像源,应该类似这样拉取:
$ docker pull quay.azk8s.cn/xxx/yyy:zzz
- 演示一个使用镜像源拉取的实例
# 使用中科大镜像源
$ docker pull quay.mirrors.ustc.edu.cn/coreos/kube-state-metrics:v1.5.0
# 使用 Azure 中国镜像源
$ docker pull quay.azk8s.cn/coreos/kube-state-metrics:v1.5.0
一些自动化工具
docker-wrapper
docker-wrapper 安装
$ git clone https://github.com/silenceshell/docker-wrapper.git
$ sudo cp docker-wrapper/docker-wrapper.py /usr/local/bin/ docker-wrapper 使用
$ docker-wrapper pull k8s.gcr.io/kube-apiserver:v1.14.1
$ docker-wrapper pull gcr.io/google_containers/kube-apiserver:v1.14.1
$ docker-wrapper pull nginx
$ docker-wrapper pull silenceshell/godaddy:0.0.
azk8spull
azk8spull 安装
$ git clone https://github.com/xuxinkun/littleTools$ cd littleTools
$ chmod +x install.sh
$ ./install.sh azk8spull 使用
$ azk8spull quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.24.
$ azk8spull k8s.gcr.io/pause-amd64:3.1
参考文档
- https://www.google.com
- https://ieevee.com/tech/2019/03/02/azure-gcr-proxy.html
- https://www.cnblogs.com/xuxinkun/p/11025020.html
- https://www.ilanni.com/?p=14534
Docker / Kubernetes 镜像源的更多相关文章
- docker 国内镜像源
参考:docker 国内镜像源 作者:Joncc Linux环境 # vi /etc/docker/daemon.json { "registry-mirrors": [" ...
- docker改变镜像源
sudo echo “DOCKER_OPTS=\”\$DOCKER_OPTS –registry-mirror=http://your-id.m.daocloud.io -d\”” >> ...
- Docker国内镜像源设置
编辑json文件,添加如下内容后重启docker即可. [root@Docker ~]# cat /etc/docker/daemon.json{ "registry-mirrors&quo ...
- Docker CE 镜像源站
sudo apt-get update sudo apt-get -y install apt-transport-https ca-certificates curl software-proper ...
- docker国内镜像源
https://www.daocloud.io/mirror curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http ...
- 替换 Docker 或 Laradock 中 Debian 系统镜像源解决软件安装问题
Docker Debian 镜像源替换 因多数默认的 Docker 镜像为国外的,而采用的镜像源也是国外的,故访问很慢,所以我们需要替换为国内的(比如阿里云或163等). 163 - Debian A ...
- docker镜像源设置
由于docker默认镜像源为国外官方源,下载速度较慢.设置国内镜像源可加速 修改文件 /etc/docker/daemon.json vi /etc/docker/daemon.json 添加以下内容 ...
- docker配置国内阿里云镜像源
使用docker默认镜像源下载镜像会很慢,因此很多情况下,我们在安装完docker以后都会修改为国内的镜像,这样在下载镜像的时候就不用等那么长时间了. 配置docker的镜像为阿里云镜像 方法一 $ ...
- Docker之镜像地址
转载自https://www.cnblogs.com/doraman/p/9570891.html 官方docker hub 官方:https://hub.docker.com/explore/ 常用 ...
随机推荐
- Python使用requests爬取一个网页并保存
#导入 requests模块import requests #设置请求头,让网站监测是浏览器 headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 6. ...
- Java单体应用 - Markdown - 03.高级技巧
原文地址:http://www.work100.net/training/monolithic-markdown-advance.html 更多教程:光束云 - 免费课程 高级技巧 序号 文内章节 视 ...
- Docker windows 容器启动失败 network not found
前几天由于重启了服务器,docker配置的网络出了些问题导致在docker容器中安装的mysql识别用户权限时发生错误.(从宿主机A以user身份 登入到容器B中安装的Mysql时,用户竟然不是use ...
- python类型-序列
注:本文档主要是学习<Python核心编程(第二版)>时做的资料整理. 1.序列 序列的成员是有序排列的,并且可以通过下标偏移量访问到它的一个或者几个成员,包括字符串(普通字符串和Unic ...
- linux ftp 服务器 ,web 服务器 配置
ftp服务器配置: 1:vsftpd.conf 2;vsftpd.ftpusers 3:vsftpd.user_list web服务器配置: apache 配置
- 2019杭电多校赛第九场 Rikka with Mista
Problem Description Rikka is a fervent fan of JoJo's Bizarre Adventure. As the last episode of Golde ...
- Spring注解开发系列Ⅸ --- 异步请求
一. Servlet中的异步请求 在Servlet 3.0之前,Servlet采用Thread-Per-Request的方式处理请求,即每一次Http请求都由某一个线程从头到尾负责处理.如果要处理一些 ...
- 【学习笔记】Linux基础(一):磁盘分区与Linux的安装(以CentOS为例)
一.磁盘分区与Linux的安装(以CentOS为例) 0.说在安装之前 在Linux中,"一切设备皆文件",设备在/dev这个目录下 /dev/sd[a-p] 表示SCSI/SAT ...
- STL中的vector 和list
参考书目:visual c++ 入门经典 第七版 Ivor Horton著 第十章 认识两个容器:vector和list 容器:是STL(Standard Template Library 标准模板库 ...
- 为什么用nginx:它的5个主要优点
1.高并发,高性能 2.可扩展性好啊 3.高可靠性 4.热部署 5.BSD许可证