Skip to content

formatter: add raw byte sizes for images - #7276

Open
mrmayurgithub wants to merge 1 commit into
docker:masterfrom
mrmayurgithub:5300-image-json-size-bytes-signed
Open

formatter: add raw byte sizes for images#7276
mrmayurgithub wants to merge 1 commit into
docker:masterfrom
mrmayurgithub:5300-image-json-size-bytes-signed

Conversation

@mrmayurgithub

@mrmayurgithub mrmayurgithub commented Sep 2, 2026

Copy link
Copy Markdown

- What I did

Added exact SizeBytes, SharedSizeBytes, and UniqueSizeBytes values to the image formatter. Related to #5300.

- How I did it

docker image ls --format json currently returns rounded strings such as "72.9MB" or "N/A". The new fields expose the underlying byte counts as JSON numbers, or null when unavailable. Existing human-readable fields remain unchanged.

- How to verify it

Run:

GOCACHE=/private/tmp/docker-cli-go-cache ./scripts/with-go-mod.sh go test ./cli/command/formatter

The formatter test verifies exact values, unique-size calculation, unavailable values, and preservation of the existing Size output.

- Human readable description for the release notes

Signed-off-by: Mayur Agarwal <64331623+mrmayurgithub@users.noreply.github.com>
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.

2 participants