创建个人实例

https://www.aliyun.com/
主页-登陆-控制台-容器镜像服务(左上角)-实例列表-创建个人版实例
创建好个人版实例后如下图:

镜像仓库-创建命名空间-仓库名称-本地仓库-创建镜像仓库

详细步骤

1. 登录阿里云Docker Registry

$ docker login --username=昙花逐月 registry.cn-hangzhou.aliyuncs.com

用于登录的用户名为阿里云账号全名,密码为开通服务时设置的密码。

您可以在访问凭证页面修改凭证密码。

2. 从Registry中拉取镜像

$ docker pull registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat:[镜像版本号]

3. 将镜像推送到Registry

$ docker login --username=昙花逐月 registry.cn-hangzhou.aliyuncs.com
$ docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat:[镜像版本号]
$ docker push registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat:[镜像版本号]

请根据实际镜像信息替换示例中的[ImageId]和[镜像版本号]参数。

4. 选择合适的镜像仓库地址

从ECS推送镜像时,可以选择使用镜像仓库内网地址。推送速度将得到提升并且将不会损耗您的公网流量。

如果您使用的机器位于VPC网络,请使用 registry-vpc.cn-hangzhou.aliyuncs.com 作为Registry的域名登录。

5. 示例

使用"docker tag"命令重命名镜像,并将它通过专有网络地址推送至Registry。

$ docker images
REPOSITORY                                                         TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
registry.aliyuncs.com/acs/agent                                    0.7-dfb6816         37bb9c63c8b2        7 days ago          37.89 MB
$ docker tag 37bb9c63c8b2 registry-vpc.cn-hangzhou.aliyuncs.com/acs/agent:0.7-dfb6816

使用 “docker push” 命令将该镜像推送至远程。

$ docker push registry-vpc.cn-hangzhou.aliyuncs.com/acs/agent:0.7-dfb6816

实战

[root@localhost local]# docker logout
Removing login credentials for https://index.docker.io/v1/
[root@localhost local]# docker push 532549873/wanglei
Using default tag: latest
The push refers to repository [docker.io/532549873/wanglei]
74ddd0ec08fa: Layer already exists
errors:
denied: requested access to the resource is denied
unauthorized: authentication required[root@localhost local]# 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-storeLogin Succeeded
[root@localhost local]# docker images
REPOSITORY                   TAG       IMAGE ID       CREATED       SIZE
532549873/wanglei/mytomcat   latest    c62e4d6eff9e   3 hours ago   722MB
mytomcat                     latest    c62e4d6eff9e   3 hours ago   722MB
<none>                       <none>    2fb626a5d393   4 hours ago   722MB
<none>                       <none>    5b8005baad94   5 hours ago   722MB
532549873/wanglei            latest    5d0da3dc9764   13 days ago   231MB
centos                       latest    5d0da3dc9764   13 days ago   231MB
[root@localhost local]# docker tag c62e4d6eff9e registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat:1.0
[root@localhost local]# docker images
REPOSITORY                                                TAG       IMAGE ID       CREATED       SIZE
532549873/wanglei/mytomcat                                latest    c62e4d6eff9e   3 hours ago   722MB
mytomcat                                                  latest    c62e4d6eff9e   3 hours ago   722MB
registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat   1.0       c62e4d6eff9e   3 hours ago   722MB
<none>                                                    <none>    2fb626a5d393   4 hours ago   722MB
<none>                                                    <none>    5b8005baad94   5 hours ago   722MB
532549873/wanglei                                         latest    5d0da3dc9764   13 days ago   231MB
centos                                                    latest    5d0da3dc9764   13 days ago   231MB
[root@localhost local]# docker push registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat
Using default tag: latest
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat]
tag does not exist: registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat:latest
[root@localhost local]# docker push registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat:1.0
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/wanglei_work/mytomcat]
3fa2289bd5a1: Pushed
30d0091a48e5: Pushed
bb90aa2e209a: Pushed
06086259a1a2: Pushed
74ddd0ec08fa: Pushed
1.0: digest: sha256:54f21cc0b73d1375c6ac72a2cd313a32c212ce38274673921a1cd674eff97fc3 size: 1373
[root@localhost local]# 

发布自己的镜像到阿里云仓库相关推荐

  1. Docker推送进镜像到阿里云仓库

    1.登录阿里云容器镜像服务器 https://cr.console.aliyun.com 2.设置Registry登录密码 3.创建命名空间 4.创建镜像仓库 1. 登录阿里云Docker Regis ...

  2. 上传镜像到阿里云仓库

    1.登录阿里云找到容器镜像服务 2.点击个人实例 3.创建镜像仓库 4.点击你的仓库根据操作指南操作 三步就可以搞定,但是有细节 5.操作案例 上面是我的镜像,比如我选择最后一行的mysql镜像,记住 ...

  3. 将本地镜像发布到阿里云仓库

    案例1: 基于下载安装的基本的centos系统,构建一个新的镜像,新功能增强,并将该镜像发布到阿里云仓库 1.登录阿里云 登录阿里云,进入控制台,选择镜像服务. 2.选择个人实例 3.创建命名空间 4 ...

  4. (五)本地镜像发布到阿里云仓库以及私有库

    本地镜像发布到阿里云以及私有库 一.流程图 二.使用阿里云镜像仓库 三.私有库的使用 1.创建私有库运行 2.案例演示 一.流程图 二.使用阿里云镜像仓库 登录阿里云控制台,创建自己的个人实例,如下 ...

  5. kubenetes(五)发布 阿里云仓库的镜像

    K8S发布阿里云仓库的镜像 试过多次发现k8s不能从阿里云直接接取镜像,发布流程与官方多了个创建使用证书的步骤,使用记录需要以下处理  1:登陆阿里云 docker login --username= ...

  6. maven给默认中央仓库设置镜像为阿里云maven仓库并添加全局远程仓库

    1.copy 配置文件setting.xml到用户目录(非必需但强烈推荐) idea.eclipse默认优先读取用户目录的setting.xml,所以作此配置. 从安装目录copy到 "用户 ...

  7. 将本地docker镜像推送到阿里云仓库

    1. 进入到个人的阿里云容器镜像服务阿里云登录 - 欢迎登录阿里云,安全稳定的云计算服务平台,创建命名空间 2. 创建仓库 选择本地仓库  创建成功后会生成一个操作指南 3. 将本地镜像推送到阿里云仓 ...

  8. 阿里云仓库使用小技巧

    Maven 阿里云仓库使用小技巧 简介     平时工作或者学习中经常需要看下别人的工程示例代码,但maven的依赖导入经常有些问题,maven镜像使用默认是国外的,众所周知慢的离谱,有时候出门散个步 ...

  9. Docker11_1:Docker阿里云仓库

    Docker11_1:Docker阿里云仓库 1.创建GitLab的Access Token 2.绑定GitLab代码平台 3.创建命名空间 4.创建镜像仓库并绑定命名空间 5.仓库类型选择:远程仓库 ...

最新文章

  1. 惊呆,一条sql竟然让oracle奔溃了
  2. 【Vegas原创】“無法解析 equal to 動作的定序衝突”错误的处理
  3. 【多线程】join()和detach()的用法
  4. Python Redis pipeline操作(秒杀实现)
  5. python学生管理系统(函数方法)_(python函数)学生管理系统
  6. ITester软件测试小栈历时9个月文章汇总
  7. 感谢3G,告别3G:开启移动互联网时代的“功臣”退出历史舞台
  8. 关于数模中编程的一点愚见
  9. 调侃《Head First设计模式》之总结篇
  10. idea常用快捷键以及自定义快捷键
  11. [经典力学]牛顿自然哲学的数学原理论文解读
  12. python 文件另存为快捷键_pycharm快捷键
  13. 商汤的AI伴游小精灵(找最多子树)
  14. IE浏览器设置默认显示版本
  15. 深信服 VDS设备烤机
  16. Python:peewee常用操作CRUD
  17. 微信真的在后台频繁读取用户相册吗?
  18. 在网商大会上马云的讲话
  19. MBA-day19 如果p则q矛盾关系p 且非q
  20. 【学习资料】红蓝紫队视角下的实战攻防演习

热门文章

  1. bim webgl 模型 轻量化_WebGL轻量化BIM引擎如何加载大体量BIM模型
  2. 关于毕业求职的就业经验-写给我亲爱的校友们
  3. 2023第十三届“中兴捧月”全球精英挑战赛今日正式启动
  4. tSNE—高维数据降维可视化(理论部分)
  5. 2021年度IT吃瓜指南
  6. 魔方(9)四轴枫叶魔方、四轴斜转魔方
  7. matlab绘制折线图基本操作
  8. long类型强转成int类型解析
  9. 如何给table里的input赋值
  10. 记上海紫龙技术美术实习生面经