zoukankan      html  css  js  c++  java
  • Docker发布镜像至Docker Hub

    第一步:Docker生成镜像

    docker@default:~$ docker images
    REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
    metal-workbench-api-image    latest              a1ad98094180        7 hours ago         750MB

    第二步:登陆至Docker

    docker@default:~$ docker login
    Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
    Username: weschen
    Password:
    Login Succeeded

    第三步:给现有镜像打tag

    docker@default:~$ docker tag a1ad98094180 weschen/metal-workbench-api-image:1.0.0
    
    docker@default:~$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE metal-workbench-api-image latest a1ad98094180 7 hours ago 750MB weschen/metal-workbench-api-image 1.0.0 a1ad98094180 7 hours ago 750MB

    第四步:推送镜像至Docker Hub

    docker@default:~$ docker push weschen/metal-workbench-api-image
    The push refers to a repository [docker.io/weschen/metal-workbench-api-image]
    e36d859cca87: Pushed
    c926dd536114: Pushed
    d6b6b16c6c71: Pushed
    6d3032715cbe: Pushed
    df95dc115bab: Pushed
    e5f36aeaca66: Pushed
    ae227185393e: Mounted from library/node
    d50f959eea7b: Mounted from library/node
    677f02386f07: Mounted from library/node
    7b3b4fef39c1: Mounted from library/node
    ecf5c2e2468e: Mounted from library/node
    bb07d0c1008d: Mounted from library/node
    4902b007e6a7: Mounted from library/node
    007ab444b234: Mounted from library/node
    1.0.0: digest: sha256:ffb6f1b980d151c053565e4ff2b02b85acef3e662b60b96c210a8bbcbf165c95 size: 3257

    到此,已经将最新的镜像推送至Docker Hub

    需要更新时,直接下载相应的版本即可

    Rancher原本有两个容器是使用本地的镜像的,如果需要升级,则需要更新至与Docker Hub一样的版本

    升级过程

  • 相关阅读:
    [C/C++] 指针数组和数组指针
    [计算机网络] DNS劫持和DNS污染
    [计算机网络-数据链路层] CSMA、CSMA/CA、CSMA/CD详解
    [BinaryTree] 二叉树常考知识点
    NODE-windows 下安装nodejs及其配置环境
    MATLAB/Excel-如何将Excel数据导入MATLAB中
    Excel-怎样实现行列转置
    一篇文章学懂Shell脚本
    SQL-MySQL使用教程-对MySQL的初步尝试
    资源贴-在线编译环境推荐
  • 原文地址:https://www.cnblogs.com/weschen/p/6973033.html
Copyright © 2011-2022 走看看