Publish the local image to Alibaba Cloud

Publish the local image to Alibaba Cloud

step:

  1. Log in to "Alibaba Cloud Developer Platform" to create a namespace and mirror warehouse
    Insert picture description here

Insert picture description here

  1. Push the image to Alibaba Cloud
# 登陆阿里云的docker仓库 
docker login --username=liuyuanshan11 registry.cn-hangzhou.aliyuncs.com

# 创建指定镜像的tag,归入某个仓库 
#docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/liuyuanshan/tomcat:[镜像版本号]

docker tag 6a18af715783 registry.cn-hangzhou.aliyuncs.com/liuyuanshan/tomcat:v1.0

# 将镜像推送到仓库中 
#docker push registry.cn-hangzhou.aliyuncs.com/liuyuanshan/tomcat:[镜像版本号]
docker push registry.cn-hangzhou.aliyuncs.com/liuyuanshan/tomcat:v1.0
  1. Pull mirror
docker pull registry.cn-hangzhou.aliyuncs.com/liuyuanshan/tomcat:v1.0

Guess you like

Origin blog.csdn.net/weixin_39218464/article/details/113059855