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 的一部分,方便进行监控容器信息
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2018-02-18 modsecurity3.0 nginx 安装
2016-02-18 Exploring the Angular 1.5 .component() method
2016-02-18 AngularJS 1.5.0-beta.2 and 1.4.8 have been released