0


docker在阿里云上的镜像仓库管理

目录


一.登录进入阿里云网站,点击个人实例进行创建

阿里云登录 - 欢迎登录阿里云,安全稳定的云计算服务平台

二.创建仓库,填写相关信息

选择公共,私有在拉取镜像时需要登录

34571d43373743bc83040c8ae7de6d7b.png

选择本地仓库

c6d2916681f64caea0cabd2593a5c4f2.png 创建完成

1ef86536128c48029b02604e253c8106.png

ec7140a9cff14e249340312b2ce9cad4.png

三.在访问凭证中设置固定密码用于登录,登录时用户名是使用你注册阿里云的账号名称,密码使用设置的固定密码

49f5eea7bc84427f8a1ed5261123f4d4.png

[root@localhost ~]# docker login --username=aliyun783xxxxxxx 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@localhost ~]# docker tag mysql:5.6 registry.cn-hangzhou.aliyuncs.com/su03/mycontainer:mysql_5.6  #这个地址在仓库信息页面直接复制
[root@localhost ~]# docker push registry.cn-hangzhou.aliyuncs.com/su03/mycontainer:mysql_5.6 
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/su03/mycontainer]
7137327a7221: Pushed 
49a1ca1cd2b8: Pushed 
7c5a5c1986b1: Pushed 
eba393347f89: Pushed 
2612088e90f6: Pushed 
e3dce1c82d4e: Pushed 
7ea96a4e341b: Pushed 
4085e588967d: Pushed 
d414fdead0b9: Pushed 
2e1029557391: Pushed 
2b83e5699838: Pushed 
mysql_5.6: digest: sha256:897086d07d1efa876224b147397ea8d3147e61dd84dce963aace1d5e9dc2802d size: 2621

五.拉取镜像验证

[root@localhost ~]# docker pull registry.cn-hangzhou.aliyuncs.com/su03/mycontainer:mysql_5.6
mysql_5.6: Pulling from su03/mycontainer
Digest: sha256:897086d07d1efa876224b147397ea8d3147e61dd84dce963aace1d5e9dc2802d
Status: Image is up to date for registry.cn-hangzhou.aliyuncs.com/su03/mycontainer:mysql_5.6
registry.cn-hangzhou.aliyuncs.com/su03/mycontainer:mysql_5.6
[root@localhost ~]# docker images
REPOSITORY                                           TAG         IMAGE ID       CREATED         SIZE
mysql                                                5.6         dd3b2a5dcb48   20 months ago   303MB
registry.cn-hangzhou.aliyuncs.com/su03/mycontainer   mysql_5.6   dd3b2a5dcb48   20 months ago   303MB
owncloud                                             latest      327bd201c5fb   4 years ago     618MB
[root@localhost ~]# docker run -it --name alimysql registry.cn-hangzhou.aliyuncs.com/su03/mycontainer:mysql_5.6 ls /
bin  boot  dev    docker-entrypoint-initdb.d  entrypoint.sh  etc    home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
标签: docker 阿里云 容器

本文转载自: https://blog.csdn.net/weixin_64334766/article/details/132499090
版权归原作者 树下一少年 所有, 如有侵权,请联系我们删除。

“docker在阿里云上的镜像仓库管理”的评论:

还没有评论