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
@AkihiroSuda
AkihiroSuda requested a review from a team August 1, 2026 17:19
- IMAGE: Image reference ("repository:tag", "repository@digest", or "<untagged>")
- ID: OCI Digest. Usually different from Docker image ID. Shared for multi-platform images.
- DISK USAGE: Size of the unpacked snapshots
- CONTENT SIZE: Size of the blobs (such as layer tarballs) in the content store

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DISK USAGE and CONTENT SIZE seem to differ from Docker

$ docker images
                                                                                                                                                                                                                                i Info →   U  In Use
IMAGE           ID             DISK USAGE   CONTENT SIZE   EXTRA
alpine:latest   28bd5fe8b56d       13.6MB         4.27MB        

$ nerdctl images
                                                                                                                                                                                                                                i Info →   U  In Use
IMAGE            ID              DISK USAGE    CONTENT SIZE    EXTRA
alpine:latest    28bd5fe8b56d    9.31MB        4.185MB 

Perhaps not a bug though

Properties:
By default (Docker v29 compatible view) the following columns are shown:
- IMAGE: Image reference ("repository:tag", "repository@digest", or "<untagged>")
- ID: OCI Digest. Usually different from Docker image ID. Shared for multi-platform images.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer different?

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

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