docker上传镜像到阿里云仓库
1、首先要注册阿里云仓库
[root@pgcm /]# docker login --username=mamba_cloud 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@pgcm /]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
wcbpgcm 1.0 0c5cd94de372 2 hours ago 3.79GB
lhrbest/lhrcentos76 8.8 6dc4a98f7bc0 5 days ago 3.8GB
centos 7.6.1810 f1cb7c7d58b7 3 years ago 202MB
[root@pgcm /]# docker tag 0c5cd94de372 registry.cn-hangzhou.aliyuncs.com/mamba_cloud/pg:pgcm_wcbcentos76
[root@pgcm /]# docker push registry.cn-hangzhou.aliyuncs.com/mamba_cloud/pg:pgcm_wcbcentos76
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/mamba_cloud/pg]
dd9a3e29e52b: Pushing [===========> ] 858.3MB/3.593GB
89169d87dbe2: Pushed