登录 注册
网络与基础设施
54,721
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
Go
语言
创建时间
最近更新

项目能做什么

用于逐层探索与分析 Docker 镜像内容的分析工具。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# dive
[![GitHub release](https://img.shields.io/github/release/wagoodman/dive.svg)](https://github.com/wagoodman/dive/releases/latest)
[![Validations](https://github.com/wagoodman/dive/actions/workflows/validations.yaml/badge.svg)](https://github.com/wagoodman/dive/actions/workflows/validations.yaml)
[![Go Report Card](https://goreportcard.com/badge/github.com/wagoodman/dive)](https://goreportcard.com/report/github.com/wagoodman/dive)
[![License: MIT](https://img.shields.io/badge/License-MIT%202.0-blue.svg)](https://github.com/wagoodman/dive/blob/main/LICENSE)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=flat)](https://www.paypal.me/wagoodman)

**A tool for exploring a Docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image.**


![Image](.data/demo.gif)

To analyze a Docker image simply run dive with an image tag/id/digest:
```bash
dive <your-image-tag>
```

or you can dive with Docker directly:
```
alias dive="docker run -ti --rm  -v /var/run/docker.sock:/var/run/docker.sock docker.io/wagoodman/dive"
dive <your-image-tag>

# for example
dive nginx:latest
```

or if you want to build your image then jump straight into analyzing it:
```bash
dive build -t <some-tag> .
```

Building on macOS (supporting only the Docker container engine):

```bash
docker run --rm -it \
      -v /var/run/docker.sock:/var/run/docker.sock \
      -v  "$(pwd)":"$(pwd)" \
      -w "$(pwd)" \
      -v "$HOME/.dive.yaml":"$HOME/.dive.yaml" \
      docker.io/wagoodman/dive:latest build -t <some-tag> .
```

Additionally you can run this in your CI pipeline to ensure you're keeping wasted space to a minimum (this skips the UI):
```
CI=true dive <your-image>
```

![Image](.data/demo-ci.png)

**This is beta quality!** *Feel free to submit an issue if you want a new feature or find a bug :)*

## Basic Features

**Show Docker image contents broken down by layer**

As you select a layer on the left, you are shown the contents of that layer combined with all previous layers on the right. Also, you can fully explore the file tree with the arrow keys.

**Indicate what's changed in each layer**

Files that have changed, been modified, added, or removed are indicated in the file tree. This can be adjusted to show changes for a specific layer, or aggregated changes up to this layer.

**Estimate "image efficiency"**

The lower left pane shows basic layer info and an experimental metric that will guess how much wasted space your image contains. This might be from duplicating files across layers, moving files across layers, or not fully removing files. Both a percentage "score" and total wasted file space is provided.

**Quick build/analysis cycles**

You can build a Docker image and do an immediate analysis with one command:
`dive build -t some-tag .`

You only need to replace your `docker build` command with the same `dive build`
command.

**CI Integration**

Analyze an image and get a pass/fail result based on the image eff
阅读完整原文

商业机会分析 AI 生成

自动分析与PR生成的 GitHub Action / GitLab 插件

产品构想基于 dive 核心分析逻辑,开发一款持续集成自动化优化工具,发现镜像浪费空间后直接生成优化建议或提交重构 Dockerfile 的 PR。
核心功能CI 镜像分析与评级、Dockerfile 坏味道扫描、自动提供合并层与清理缓存的 PR 补丁、历史体积变化趋势图。
目标用户开源维护者、中小型研发团队的 DevOps 工程师。
难度/周期中等 · 3-5 周 · 成本:低(主要为轻量云函数与 GitHub Marketplace 上架运营成本)
收费模式Freemium 模式(公开仓库免费,私有仓库按席位或按流水线运行次数订阅制收费)。
竞争风险依赖上游 Dockerfile 解析精度,部分复杂多阶段构建优化可能破坏构建逻辑。
依据 已验证事实

企业级容器镜像精简与分发加速 SaaS 控制台

产品构想提供私有 Registry 旁路对接平台,定期批量扫描内部所有生产镜像,输出空间浪费/效率看板,并一键触发无损镜像压缩与清理。
核心功能私有镜像仓库(Harbor/ECR/ACR)静默批量扫描、浪费空间聚合报表、基于层复用的优化指导、与 CI/CD 质量门禁阻断集成。
目标用户中大型企业平台工程团队、云原生运维负责人。
难度/周期较高 · 8-12 周 · 成本:中等(需要服务器处理镜像拉取解析与元数据存储)
收费模式企业级 B2B 订阅(按镜像仓库容量或托管实例规格年付)、私有化部署支持协议。
竞争风险需要接触用户私有镜像仓库凭据,安全合规审查要求高;处理大镜像对带宽和临时磁盘开销大。
依据 数据支持的判断

交互式桌面端容器镜像诊断与一键瘦身套件 (Desktop GUI)

产品构想将 dive 的终端 TUI 升级为跨平台现代化桌面客户端(Electron/Tauri),集成可视化的树状图、文件差异对比,并提供本地镜像一键重构导出能力。
核心功能现代化可视化 Treemap 展示、拖拽式层合并与排除过滤、Docker Desktop/Podman 扩展插件、本地一键重打包导出瘦身镜像。
目标用户本地容器开发频繁的个人开发者、全栈工程师。
难度/周期中等 · 4-6 周 · 成本:极低(纯客户端运行,无云端服务器负担)
收费模式买断制 License(通过 Gumroad / Lemon Squeezy 销售高级交互功能,如多镜像版本可视化 Diff、Dockerfile 自动优化建议)。
竞争风险受众中极客偏好命令行免费工具,付费意愿相比团队级方案较低。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
Lordog/dive-into-llms 中文介绍暂未生成
《动手学大模型Dive into LLMs》系列编程实践教程
60,044 Jupyter Notebook
go-playground/validator 中文介绍暂未生成
:100:Go Struct and Field validation, including Cross Field,
20,229 Go
dzhng/deep-research 中文介绍暂未生成
An AI-powered research assistant that performs iterative, de
19,893 TypeScript
ShusenTang/Dive-into-DL-PyTorch 中文介绍暂未生成
本项目将《动手学深度学习》(Dive into Deep Learning)原书中的MXNet实现改为PyTorch实现
19,530 Jupyter Notebook
halfrost/Halfrost-Field 中文介绍暂未生成
✍🏻 Source Code Deep Dives, System Design & Engineering Blogs
13,256 Go
AkashSingh3031/The-Complete-FAANG-Preparation 中文介绍暂未生成
Dive into this repository, a comprehensive resource covering
12,310 Jupyter Notebook
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 ,最近推送 ,发布过 28 个 Release
社区活跃Star 54,721 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/wagoodman/dive.git
cd dive
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。