上传 docker 镜像到阿里云仓库
1、登入阿里云地址
2、搜索 “容器镜像服务”,找到镜像仓库,创建镜像仓库
3、进入仓库查看创建后的镜像仓库信息
4、登入并上传本地镜像到仓库地址
[root@k8s-master ingress]# docker login --username=你的用户名 registry.cn-hangzhou.aliyuncs.com Password: WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store Login Succeeded [root@k8s-master ingress]# docker tag k8s.gcr.io/defaultbackend-amd64:1.5 registry.cn-hangzhou.aliyuncs.com/wangzy001/k8s:1.5 [root@k8s-master ingress]# docker push registry.cn-hangzhou.aliyuncs.com/wangzy001/k8s:1.5 The push refers to repository [registry.cn-hangzhou.aliyuncs.com/wangzy001/k8s] b108d4968233: Pushed 1.5: digest: sha256:4dc5e07c8ca4e23bddb3153737d7b8c556e5fb2f29c4558b7cd6e6df99c512c7 size: 528 [root@k8s-master ingress]#
5、查看阿里云镜像是否上传成功
6、拉取镜像
[root@k8s-master ingress]# docker pull registry.cn-hangzhou.aliyuncs.com/wangzy001/k8s:1.5 1.5: Pulling from wangzy001/k8s Digest: sha256:4dc5e07c8ca4e23bddb3153737d7b8c556e5fb2f29c4558b7cd6e6df99c512c7 Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/wangzy001/k8s:1.5 registry.cn-hangzhou.aliyuncs.com/wangzy001/k8s:1.5 [root@k8s-master ingress]#
完成