explaingit

wagoodman/dive

Analysis updated 2026-06-20

53,880GoAudience · ops devopsComplexity · 2/5Setup · easy

TLDR

Dive is an interactive terminal tool that lets you explore a Docker image layer by layer, see exactly which files changed in each layer, and identify wasted space to shrink your image.

Mindmap

mindmap
  root((Dive))
    What it does
      Layer-by-layer view
      File change tracking
      Efficiency scoring
      CI mode analysis
    UI Features
      Split-panel terminal
      Wasted space detection
      Change type highlighting
    Inputs
      Docker daemon images
      Podman images
      Saved image archives
    Use Cases
      Shrink Docker images
      Debug image contents
      Enforce size policies
    Audience
      DevOps engineers
      Platform teams
      Backend developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Inspect a Docker image to find which Dockerfile steps added the most size and optimize them.

USE CASE 2

Identify files accidentally left in an image layer that should have been cleaned up in the same step.

USE CASE 3

Run Dive in CI mode to automatically fail a build if an image wastes more than a defined percentage of space.

USE CASE 4

Debug unexpected files or directories appearing inside a container image without running the container.

What is it built with?

Go

How does it compare?

wagoodman/divego-gitea/giteaetcd-io/etcd
Stars53,88055,40151,672
LanguageGoGoGo
Setup difficultyeasymoderatehard
Complexity2/54/54/5
Audienceops devopsdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires Docker daemon running locally. Available as a binary download, Homebrew formula, or runnable as a Docker container itself.

In plain English

Dive is a command-line tool for inspecting Docker container images layer by layer. Docker images are built in layers, where each layer represents a set of filesystem changes from a specific step in the build process. Without a tool like Dive, the only way to understand what is inside a Docker image and why it is so large is to run the container and poke around, which is tedious. Dive gives you an interactive terminal interface where you can navigate through each layer of an image, see exactly which files were added, changed, or removed in that layer, and understand how much space each layer contributes. The tool works by reading the Docker image from your local Docker daemon (or a saved archive, or from Podman), extracting each layer's filesystem changes, and presenting them in a split-panel terminal interface. The left panel shows the layers, the right panel shows the combined filesystem state up to the selected layer. Files that changed are highlighted by type of change. Dive also calculates an "image efficiency" score estimating how much space is wasted by things like files being overwritten or unnecessarily duplicated across layers. This helps identify Dockerfile optimizations like combining multiple RUN commands or cleaning up temporary files within the same layer that created them. A CI mode (activated by setting the environment variable CI=true) skips the interactive interface and instead analyzes the image automatically, returning a pass or fail result based on configurable thresholds for efficiency and wasted space. You would use Dive when you want to shrink a Docker image, debug unexpected image contents, or enforce image size policies in a continuous integration pipeline. It is built in Go and available as a binary, Homebrew formula, or Docker image itself.

Copy-paste prompts

Prompt 1
I have a Docker image called my-app:latest that is 1.2GB. Use Dive to analyze it and show me which layers are adding the most weight and what I can do in my Dockerfile to reduce the size.
Prompt 2
How do I run Dive in CI mode to automatically fail my pipeline if my Docker image efficiency score drops below 90%?
Prompt 3
Walk me through reading the Dive terminal UI: what does the left panel show versus the right panel, and what do the highlighted file change colors mean?
Prompt 4
My Docker image has files in /tmp that I thought I deleted. How can I use Dive to find which layer added them and why the deletion in a later layer did not remove them from the image size?
Prompt 5
Show me how to run Dive against a Podman image instead of a standard Docker image.

Frequently asked questions

What is dive?

Dive is an interactive terminal tool that lets you explore a Docker image layer by layer, see exactly which files changed in each layer, and identify wasted space to shrink your image.

What language is dive written in?

Mainly Go. The stack also includes Go.

How hard is dive to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is dive for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub wagoodman on gitmyhub

Verify against the repo before relying on details.