• DockerPush


     

    1.阿里云镜像发布流程

     

    2.镜像生成

    语法:docker commit [OPTIONS] 容器ID [REPOSITORY[:TAG]]

    [root@pluto data]# docker images

    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

    centos              6.81                68f963fbef95        4 seconds ago       380.9 MB

     

    [root@pluto data]# docker run -it centos:centos6.81

    ctrl+p+q

     

    [root@pluto data]# docker commit -a pluto -m "new centos6.82 with vim and ifconfig" 097f44f346e3 centos:6.82

     

    [root@pluto data]# docker images

    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

    centos              6.82                68f963fbef95        4 seconds ago       380.9 MB

    3.将镜像push到阿里云

    [1].镜像原型

    [root@pluto data]# docker images

    REPOSITORY                                         TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

    centos                                             6.82                68f963fbef95        35 minutes ago      380.9 MB

    [2].创建仓库镜像

    (1).创建命名空间

     

    (2).创建镜像仓库

      

    [3].镜像推送到registry

    $ sudo docker login --username=13023490952 registry.cn-shenzhen.aliyuncs.com

    $ sudo docker tag [ImageId] registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:[镜像版本号]

    $ sudo docker push registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:[镜像版本号]

     

     

    (1).login

    [root@pluto /]# sudo docker login --username=13023490952 registry.cn-shenzhen.aliyuncs.com

    WARNING: login credentials saved in /root/.docker/config.json

    Login Succeeded

      因为我之前登陆过,所以可以不输入密码,否则会提示输入密码

    (2).tag

    [root@pluto /]# docker images

    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

    centos              6.82                68f963fbef95        50 minutes ago      380.9 MB

    [root@pluto /]#  sudo docker tag 68f963fbef95 registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:6.82.1

    (3).push

    [root@pluto /]# sudo docker push registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:6.82.1

    [root@pluto /]# docker images

    REPOSITORY                                             TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

    registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest   6.82.1              68f963fbef95        59 minutes ago      380.9 MB

    [4].查询镜像

     

    [5].查看详情

     

    4.pull到docker

     

    [root@pluto /]# docker pull registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:6.82.1

  • 相关阅读:
    思念
    Matlab与C++混合编程,添加OpenCV库
    重新启用此博客
    将博客搬至CSDN
    unity探索者之ILRuntime代码热更新
    unity探索者之UGUI圆形图片组件
    unity探索者之UGUI图片描边
    unity探索者之iOS微信登录、分享
    unity探索者之复制内容到剪贴板
    unity探索者之获取设备当前电量
  • 原文地址:https://www.cnblogs.com/HOsystem/p/13861885.html
Copyright © 2020-2023  润新知