wagoodman/dive
A tool for exploring each layer in a docker image
How dive is put together
Dive is a Go CLI/TUI tool for exploring Docker/OCI container images layer-by-layer and estimating wasted space. It resolves an image from one of three sources (Docker engine, Docker tar archive, or Podman engine) via a resolver abstraction, builds per-layer file trees, computes diff/efficiency metrics, and either renders an interactive terminal UI (gocui-based) or, when CI=true, evaluates pass/fail rules and exports JSON. Data flows: resolver -> image/layer analysis -> filetree comparer -> adapter layer -> UI views or CI/export evaluators. Events are dispatched through an internal bus (go-partybus) for progress and errors.
Languages
Frameworks
Infrastructure
Major components
CLI entry & commands (cmd/dive)
Wires up the clio/cobra application, version metadata, and subcommands (root/run, build, ci, export, load, config).
Image resolvers (dive/image)
Abstracts fetching image metadata and layers from Docker engine, Docker tar archives, or Podman, selected by --source or source:// prefix.
Filetree analysis (dive/filetree)
Builds per-layer file trees, computes diffs between trees, tracks added/modified/removed nodes, and calculates image efficiency/wasted-space scores.
Command adapters (cmd/dive/cli/internal/command/adapter)
Bridges core analysis into analyzer, evaluator, exporter, and resolver implementations consumed by CLI commands.
CI evaluator (cmd/dive/cli/internal/command/ci)
Evaluates .dive-ci rules (lowestEfficiency, highestWastedBytes, highestUserWastedPercent) to produce pass/fail exit codes.
Export command (cmd/dive/cli/internal/command/export)
Serializes analysis results (e.g., JSON) for machine consumption.
Terminal UI v1 (cmd/dive/cli/internal/ui/v1)
Interactive gocui application with layer view, filetree view, filtering, keybindings, layout manager, and viewmodels; plus a no-UI mode for CI.
Internal bus & logging (internal/bus, internal/log)
Publishes typed events (progress, exploration payloads) and structured logging helpers shared across components.
No digest this week
1 weeksWeek of
Dependencies and code review
Dependency advisories
Security Watch
No known advisories across 0 scanned dependencies.
No known advisories in the scanned dependencies.
Code review
No concrete code-level issues confirmed.
Get this report every week for your repos.
GitZoid learns each repo, reports what changed, and flags what needs attention. One flat price for the whole team.
$19 a month, flat · First 10 outputs free · No card required