talira

Explore each layer of a Docker image and find ways to shrink it

open sourceMITfree

dive is a terminal tool for exploring a Docker or OCI image layer by layer: it shows each layer's contents as a file tree, marks files added, changed or removed, and estimates the image's efficiency and wasted space (files duplicated or moved across layers, or not fully removed). You can build an image and inspect it straight away with dive build, read images from Docker, Podman or a saved archive with --source, and run it in CI with CI=true to fail a build whose wasted space or efficiency crosses your thresholds. It installs with Homebrew, apt, Snap, Chocolatey or as a Docker image.

Problems it solves

  • why is my Docker image so big
  • see which layer of a Docker image added which files
  • fail CI when a Docker image wastes space
  • find duplicated files across my container image layers

Features

  • layer-by-layer file tree with added, changed and removed files
  • image efficiency score and wasted space
  • dive build to build and inspect
  • Docker, Podman and archive sources
  • CI mode with pass or fail thresholds

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what dive does.

  1. SlimToolkit Inspect, minify and debug your containers
  2. shiplist Put every file in a repository in exactly one list, and check what ships in your Docker images and packages

Compare dive with the top 3