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

 
 
 
 

dive 方便的观察容器各层信息的工具的更多相关文章

  1. Dive查看docker镜像层信息

    1.主要采用docker运行dive的方式,不然宿主机还要安装go那些挺麻烦的.具体用法可查看官方: https://github.com/wagoodman/dive 2.拉取dive镜像 dock ...

  2. 【docker】【mysql】docker安装mysql,阿里云docker镜像加速器,docker搜索查看远程仓库上的镜像,docker拉取镜像,查看本地所有镜像,查看容器的运行状况,查看容器的详细信息

    在docker上安装mysql有两种方式 1.通过Dockerfile构建 2.直接在docker hub上拉取镜像安装 =================本篇采用方法2=============== ...

  3. 问题请教:关于同一个POD中多容器的广播信息问题

    广大博友好,最近在K8S集群中遇到一个问题,贴出来同大家分享一下 同一个POD中多个容器 如何处理广播信息? 经测试 同一个POD中当先启动的容器占用广播端口后,其他的容器启动就会报bind erro ...

  4. Docker 与 K8S学习笔记(二十)—— 使用Downward API向容器注入Pod信息

    Kubernetes在创建Pod时,会为Pod和容器设置一些额外的信息,比如Pod名称.Pod IP.Node IP.Label.Annotation.资源限制等,我们经常会在应用程序中使用到这些数据 ...

  5. Kali Linux信息收集工具

    http://www.freebuf.com/column/150118.html 可能大部分渗透测试者都想成为网络空间的007,而我个人的目标却是成为Q先生! 看过007系列电影的朋友,应该都还记得 ...

  6. Kali Linux信息收集工具全集

    001:0trace.tcptraceroute.traceroute 描述:进行路径枚举时,传统基于ICMP协议的探测工具经常会受到屏蔽,造成探测结果不够全面的问题.与此相对基于TCP协议的探测,则 ...

  7. Kali Linux信息收集工具全

    可能大部分渗透测试者都想成为网络空间的007,而我个人的目标却是成为Q先生! 看过007系列电影的朋友,应该都还记得那个戏份不多但一直都在的Q先生(由于年级太长目前已经退休).他为007发明了众多神奇 ...

  8. 主机信息收集工具DMitry

    主机信息收集工具DMitry   DMitry是Kali Linux内置的一款信息收集工具.它的目标主要是Web类主机.它不仅通过主动查询.端口扫描方式,还借助第三方网站和搜索引擎获取信息. 它搜集的 ...

  9. jQuery信息提示工具jquery.poshytip (转载)

    转载地址:http://www.helloweba.com/view-blog-123.html Poshy Tip是一款非常友好的信息提示工具,它基于jQuery,当鼠标滑向链接时,会出现一个信息提 ...

随机推荐

  1. 2.19 C++友元函数和友元类

    参考: http://www.weixueyuan.net/view/6350.html 总结: 借助friend关键字将其声明为友元函数,结果,在display函数体内,我们就能访问private属 ...

  2. 怎样关掉 ubuntu 中的 System Program Problem Detected 提示框

    怎样关掉 ubuntu 中的 System Program Problem Detected 提示框 方法如下:sudo gedit /etc/default/apport  打开该文件如下:# se ...

  3. Linux文件管理常用命令用法总结

    1.touch change file timestamps. 命令用于修改文件或者目录的时间属性,包括存取时间和更改时间.若文件不存在,系统会建立一个新的文件.stat,ls -l 可以显示档案的时 ...

  4. 给rm命令设置别名防止误操作

    1通过alias命令查看别名格式并按照格式修改 alias rm='rm -i' 修改为 alias rm='echo command not found' 2通过编辑vim /etc/profile ...

  5. python列表、集合、元祖、字典推导式

    a = [1, 2, 3, 4, 5, 6, 7, 8]l=[i**2 for i in a if i**2>=16] #列表推导式+if判断print(l)print(type(l)) b={ ...

  6. Effective Java Chapter4 Classes and Interface

    MInimize the accessibility of classes and members 这个叫做所谓的 information hiding ,这么做在于让程序耦合度更低,增加程序的健壮性 ...

  7. Join Algorithm

    Join(SQL) An SQL join clause combines columns from one or more tables in a relational database. It c ...

  8. request的响应时间elapsed和超时timeout

    前言:requests发请求时,接口的响应时间,也是我们需要关注的一个点,如果响应时间太长,也是不合理的 1.获取接口请求的响应时间  r.elapsed.total_seconds() import ...

  9. FGX Native library功能介绍

    Hot news from the fields of the cross-platform library "FGX Native" development. New Engli ...

  10. 2017中国大学生程序设计竞赛 - 网络选拔赛 HDU 6154 CaoHaha's staff(几何找规律)

    Problem Description "You shall not pass!"After shouted out that,the Force Staff appered in ...