将本地镜像发布到阿里云

将本地镜像发布到阿里云

步骤:

  1. 登陆“阿里云­开发者平台”,创建命名空间和镜像仓库
    在这里插入图片描述

在这里插入图片描述

  1. 将镜像推送到阿里云
# 登陆阿里云的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. 拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/liuyuanshan/tomcat:v1.0

猜你喜欢

转载自blog.csdn.net/weixin_39218464/article/details/113059855