← All TILs · podman

Podman equivalents to Docker's Dive image-layer explorer

podman - 2026-09-12

There's no single Podman subcommand that reproduces Dive's interactive layer browser and wasted-space score. But Dive itself already speaks Podman natively, and Podman's own commands cover most of what Dive shows — just split across a few of them instead of one UI.

Dive already supports Podman directly

Per Dive's own README, --source isn't Docker-only:

dive <your-image> --source podman
# or, equivalently
dive podman://<your-image>

Same interactive layer/efficiency UI as the Docker workflow, just pointed at Podman's image store instead of the Docker daemon.

One thing worth being precise about: dive build -t <tag> . (Dive's "build then immediately analyze" shortcut) is documented as a wrapper around a Docker build, not Podman — there's no mention of it driving podman build. For a Podman workflow, build with podman build first and analyze the result with dive <tag> --source podman as a second step.

The native Podman commands, split by what each one shows

podman image tree — the layer hierarchy

podman image tree docker.io/library/wordpress

Prints every layer with its ID and size in a tree, and marks which tag sits at the top of each branch. Add --whatrequires to flip the question around — given a layer or image ID, show every image built on top of it:

podman image tree ae96a4ad4f3f --whatrequires

podman history — what command produced each layer

podman history --no-trunc --human=false <image-name>

--human is true by default (sizes and dates in a readable format); --no-trunc stops the CreatedBy column from being cut off. --format takes a Go template over the same fields — .ID, .Created, .CreatedBy, .Size, .Comment, .Tags — for scripting:

podman history --format "{{.ID}} {{.Created}} {{.CreatedBy}}" <image-name>

podman image diff — what files each layer actually changed

podman image diff <image-name>

Compares the image to its parent layer (or to a second image given explicitly) and prefixes each path with A/D/C (added/deleted/changed). Per the podman-image-diff manual, json is the only other output --format accepts here — it's not a general Go-template flag like history's:

podman image diff --format json redis:old redis:alpine

podman image inspect — the full metadata, including raw layer IDs

podman image inspect --format "{{.RootFS.Layers}}" <image-name>

RootFS is one of the documented top-level fields; its Layers list is the same diff-ID list from the image's OCI config, in build order.

Beyond Podman itself

What Dive gives you that none of the above do

The one thing genuinely missing from the native commands: Dive's wasted-space score — an estimate of how much of an image's size comes from files duplicated or shadowed across layers, not just a per-layer size list. podman history tells you how big each layer is; it doesn't tell you how much of that is redundant with another layer. That's the actual reason to reach for Dive specifically instead of stitching together image tree + history + image diff.

Created 2026-09-12T21:29:07+02:00 · Edit