Skip to content

feat(image): adopt Docker v29 output for images list - #5093

Open
ekalinin wants to merge 1 commit into
containerd:mainfrom
ekalinin:feat/images-docker-v29-output
Open

feat(image): adopt Docker v29 output for images list#5093
ekalinin wants to merge 1 commit into
containerd:mainfrom
ekalinin:feat/images-docker-v29-output

Conversation

@ekalinin

@ekalinin ekalinin commented Jul 22, 2026

Copy link
Copy Markdown

Make the default nerdctl images output match Docker v29: a collapsed view with IMAGE, ID, DISK USAGE, CONTENT SIZE and EXTRA columns, a legend line, an "In Use" (U) indicator, and <untagged> for dangling images. Multi-platform images are collapsed into a single row with aggregated disk and content size.

The new view is used only for the bare command. Passing --format, --quiet, --no-trunc, --digests or --names falls back to the legacy table, so existing scripts and templates keep working. This mirrors Docker's own shouldUseTree fallback.

The expanded per-platform --tree view is left for a follow-up.

Closes #5027

Comment thread cmd/nerdctl/image/image_list_test.go Outdated
@ekalinin
ekalinin force-pushed the feat/images-docker-v29-output branch 2 times, most recently from 14fd520 to 21a312d Compare July 23, 2026 19:00
Make the default `nerdctl images` output match Docker v29: a collapsed
view with IMAGE, ID, DISK USAGE, CONTENT SIZE and EXTRA columns, an
"In Use" (U) indicator, and <untagged> for dangling images.
Multi-platform images are collapsed into a single row with aggregated
disk and content size. Like Docker, the "In Use" legend is only printed
when the output is a terminal, so piped and redirected output stays
clean.

The new view is used only for the bare command. Passing --format,
--quiet, --no-trunc, --digests or --names falls back to the legacy table
(REPOSITORY, TAG, IMAGE ID, CREATED, PLATFORM, SIZE, BLOB SIZE), so
existing scripts and templates keep working. This mirrors Docker's own
shouldUseTree fallback.

Since the default output now matches Docker, the images tests also run
against the Docker target; only the nerdctl-specific --names subtest
stays gated. Tests that assert on the default `images` output for
untagged images (image prune/remove and build-without-tag) are updated
to expect <untagged>.

The expanded per-platform `--tree` view is left for a follow-up.

Closes containerd#5027

Signed-off-by: Eugene Kalinin <e.v.kalinin@gmail.com>
@ekalinin
ekalinin force-pushed the feat/images-docker-v29-output branch from 21a312d to 97dbfbd Compare July 24, 2026 09:28
@AkihiroSuda AkihiroSuda added this to the v2.4.0 milestone Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nerdctl images: adopt Docker v29 output

2 participants