home / containers / dive

dive

54k

Inspect Docker and OCI image layers, file changes, and wasted space to debug and optimize container images.

$brew install dive
Language
Go
Stars
53,505
Category
Containers & K8s
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

dive is a container image inspection CLI centered on layer-by-layer exploration. It opens a fullscreen TUI by default to show file changes, image efficiency, and wasted space, and can also run headless for CI checks or JSON export.

What It Enables
  • Open an image from Docker, Podman, or a Docker archive and inspect each layer's contents, build commands, and file-level changes.
  • Find duplicated or leftover files that bloat an image, with efficiency and wasted-byte estimates that help guide Dockerfile cleanup.
  • Build an image and jump straight into analysis, or gate CI on efficiency and wasted-space thresholds to catch regressions.
Agent Fit
  • The default experience is a fullscreen TUI, so the strongest agent use is assisted inspection rather than pure headless automation.
  • There is a real non-interactive path: --json writes structured layer and inefficiency data to a file, and --ci or CI=true returns pass or fail exit codes for scripted checks.
  • Fits container build workflows well when an agent needs to inspect image composition after a build, but it is narrower than general-purpose image build or registry CLIs.
Caveats
  • It needs access to a local image source such as Docker, Podman on Linux, or a Docker archive; it is not a remote registry inspection CLI by itself.
  • The README still labels the project beta quality, and its image-efficiency score is an estimate rather than a strict guarantee of image quality.