Docker推送镜像到自己的阿里云容器

1、查看推送的镜像

root@v2ray-tw:~# docker images
 REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
 centos7-v2ray       latest              949f1bacc2c0        21 seconds ago      547MB
 ubuntu              latest              3556258649b2        8 days ago          64.2MB
 centos              latest              9f38484d220f        4 months ago        202MB

# 本次推送centos7-v2ray

2、登陆阿里云容器镜像仓库

root@v2ray-tw:~# sudo docker login --username=wxxj520@126.com registry.cn-shanghai.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

3、推送镜像

root@v2ray-tw:~# docker tag centos7-v2ray registry.cn-shanghai.aliyuncs.com/wxj612/docker:centos7-v2ray
 root@v2ray-tw:~# docker push registry.cn-shanghai.aliyuncs.com/wxj612/docker:centos7-v2ray
 The push refers to repository [registry.cn-shanghai.aliyuncs.com/wxj612/docker]
 22656760d300: Layer already exists 
 d69483a6face: Layer already exists 
 centos7-v2ray: digest: sha256:ca2cb96a6fe99ab4797ad26701ef7e7b3f336382afb7c18ca3767a77a9101653 size: 742

4、查看

发表评论

登录... 后才能评论