-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixe image size #789
fixe image size #789
Conversation
0829c5e
to
d057276
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only shows the size of the default platform
cmd/nerdctl/images.go
Outdated
@@ -314,8 +314,8 @@ func (key snapshotKey) add(ctx context.Context, s snapshots.Snapshotter, usage * | |||
|
|||
// unpackedImageSize is the size of the unpacked snapshots. | |||
// Does not contain the size of the blobs in the content store. (Corresponds to Docker). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should show both the blob size and the unpacked size to avoid confusion for multi-platform images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
related issue #796 |
eb61341
to
5a3e74f
Compare
cmd/nerdctl/images.go
Outdated
@@ -109,7 +109,8 @@ type imagePrintable struct { | |||
ID string // image target digest (not config digest, unlike Docker), or its short form | |||
Repository string | |||
Tag string // "<none>" or tag | |||
Size string | |||
UnpackedSize string // the size of the unpacked snapshots. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the Size
field needs to be retained for Docker compatibility
cmd/nerdctl/images.go
Outdated
} else { | ||
fmt.Fprintln(w, "REPOSITORY\tTAG\tIMAGE ID\tCREATED\tPLATFORM\tSIZE") | ||
fmt.Fprintln(w, "REPOSITORY\tTAG\tIMAGE ID\tCREATED\tPLATFORM\tSIZE\tBLOB_SIZE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we use underscore in other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AkihiroSuda I see spaces
, BLOB SIZE
WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
e93423e
to
3dcd2ac
Compare
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
3dcd2ac
to
9cd964d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
We should do some benchmark and probably have |
@AkihiroSuda I think we can merge this, I will open a new PR for benchmark improvement |
fixing #777
ImageSize
is the size of the unpacked snapshots. for multi-platform image, snapshot host single platform layer(s). So the computing of image size shouldn't be based on image platformSigned-off-by: fahed dorgaa fahed.dorgaa@gmail.com