zoukankan      html  css  js  c++  java
  • dive 方便的观察容器各层信息的工具

    dive 是一个方便的观察容器各层信息的工具,同时也集成了容器构建命令,方便我们在构建容器
    镜像的同时查询镜像各层的变动信息

    安装

    mac 系统,可以按照自己的系统选择安装方式

    wget https://github.com/wagoodman/dive/releases/download/v0.6.0/dive_0.6.0_darwin_amd64.tar.gz
    解压,并配置系统环境变量

    使用

    • 包含的命令
    dive --help
    This tool provides a way to discover and explore the contents of a docker image. Additionally the tool estimates
    the amount of wasted space and identifies the offending files from the image.
    
    Usage:
      dive [IMAGE] [flags]
      dive [command]
    
    Available Commands:
      build Builds and analyzes a docker image from a Dockerfile (this is a thin wrapper for the `docker build` command).
      help Help about any command
      version print the version number and exit (also --version)
    
    Flags:
          --ci-config string If CI=true in the environment, use the given yaml to drive validation rules. (default ".dive-ci")
          --config string config file (default is $HOME/.dive.yaml, ~/.config/dive.yaml, or $XDG_CONFIG_HOME/dive.yaml)
      -h, --help help for dive
      -j, --json string Skip the interactive TUI and write the layer analysis statistics to a given file.
      -v, --version display version number
    
    Use "dive [command] --help" for more information about a command.
    • 查看nginx 构建信息
    dive nginx
    • 效果

    说明

    我们可以同时在构建的时候使用dive 帮忙我们查看每层镜像的变动信息,方便进行容器镜像的优化调整,使用dive build -t <imagetag> . 命令
    同时我们也可以使用docker in docker 的模式做为ci/cd 的一部分,方便进行监控容器信息

    参考资料

    https://github.com/wagoodman/dive

  • 相关阅读:
    关于web标准的理解(转)
    media type 与 media query
    HTML 5 学习 (1)
    jQuery的事件和动画
    jQuery操作Dom
    jQuery选择器的学习
    关于datetime和int 是否可为null的问题
    core animation (转)
    关于Navigation的BarButtonItem的
    iphone和ipad各控件大小
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/10396021.html
Copyright © 2011-2022 走看看