> Harbor仓库 > 五,Docker 国内镜像加速

五,Docker 国内镜像加速

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
cat /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
&quot;max-size&quot;: &quot;100m&quot;<br />
},
&quot;storage-driver&quot;: &quot;overlay2&quot;,   #存储模式
&quot;storage-opts&quot;: [
&quot;overlay2.override_kernel_check=true&quot;
],
&quot;registry-mirrors&quot;: [&quot;<a href="https://petipo7x.mirror.aliyuncs.com">https://petipo7x.mirror.aliyuncs.com</a>&quot;],   #远程仓库
&quot;insecure-registries&quot;:[&quot;172.20.20.20&quot;]  #这个就是本地私钥仓库 ,同时也是docker 镜像受信任的,必须添加在这里k8s也是一样的
}
docker login 172.20.20.20                                      #登记默认用户密码  admin / Harbor123456
docker info                                                    #查看docker详情信息,包括镜像加速地址<br />
docker pull mysql:5.7.38                                       #下载docker镜像
docker images                                                  #镜像列表
docker tag mysql:5.7.38 172.20.20.20/public/mysql:5.7.38       #把镜像做一个标签,上传到仓库去 tag
docker push 172.20.20.20/public/mysql:5.7.38                   #推送到私钥仓库去

[五,Docker 国内镜像加速]

支付宝赞助
微信赞助

五,Docker 国内镜像加速:等您坐沙发呢!

发表评论

表情
还能输入210个字