• Docker 镜像创建


    在 docker 中, 创建镜像的方式有3种方式:

    1. 基于现有容器创建镜像
    2. 基于 Dockerfile 创建镜像
    3. 通过本地模版文件创建镜像

    基于现有容器创建镜像

    关键点是docker commit命令.
    通常,当我们对一个现有容器进行修改后,我们使用docker commit命令可以提交该容器,从而生成一个新的镜像.
    我们来看下docker commit命令帮助:

    ~ # docker commit --help
    
    Usage:  docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
    
    Create a new image from a container's changes
    
    Options:
      -a, --author string    Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
      -c, --change list      Apply Dockerfile instruction to the created image
          --help             Print usage
      -m, --message string   Commit message
      -p, --pause            Pause container during commit (default true)
    

    基于 Dockerfile 创建镜像

    通过本地模版文件创建镜像

  • 相关阅读:
    vpp编写plugin
    vrf 命令
    vxlan + 多个vrf
    dpdk helloworld
    Go函数高级
    Go_defer
    Go递归函数
    Go作用域
    Go函数
    Go字符串
  • 原文地址:https://www.cnblogs.com/taadis/p/12126125.html
Copyright © 2020-2023  润新知