Skip to content
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

Reported container image size on UI seems incorrect #23771

Closed
wxiaoguang opened this issue Mar 28, 2023 · 8 comments · Fixed by #23821
Closed

Reported container image size on UI seems incorrect #23771

wxiaoguang opened this issue Mar 28, 2023 · 8 comments · Fixed by #23821
Labels
topic/packages type/enhancement An improvement of existing functionality
Milestone

Comments

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Mar 28, 2023

Description

A report from Discord channel, thanks to Fascinated.

Container registry works perfectly fine but the size of the images always shows as 856 B
Same size on 2 different packages

image

Gitea Version

1.19.0

@wxiaoguang wxiaoguang changed the title Reported container size on UI seems incorrect Reported container image size on UI seems incorrect Mar 28, 2023
@KN4CK3R
Copy link
Member

KN4CK3R commented Mar 29, 2023

The size is correct. The image is a manifest list ("there are architectures x and y, choose one") and this list is just a small json document. The real images use more space.
Docker Hub does not show the size of a manifest list ("latest" in this case) but shows the size for every architecture:
grafik

Gitea displays only the available architectures but without size.
grafik

So a simple solution would be to hide the size if an image is a manifest list to not confuse a viewer.

@wxiaoguang
Copy link
Contributor Author

Is it possible to show the real size of the real image? If it's too difficult, hiding the unrelated "size" also seems good enough.

@yp05327
Copy link
Contributor

yp05327 commented Mar 30, 2023

IMO the size in Details means the size of used local disk space.
Maybe we can add the size for each architecture in the list.

@Zettat123
Copy link
Contributor

Is it possible to show the real size of the real image?

I think yes. We can read the layers from the manifest.json of each architecture and then add up the size of each layer to get the real size of the image.

@KN4CK3R
Copy link
Member

KN4CK3R commented Mar 30, 2023

I have changed the display of architectures:
grafik
Will push the changes later.

@lunny lunny added this to the 1.19.1 milestone Mar 30, 2023
@RealFascinated
Copy link

the hope was that the size in the details would be the total size of everything in the package

@KN4CK3R
Copy link
Member

KN4CK3R commented Mar 30, 2023

That would not be correct.

@KN4CK3R KN4CK3R added type/enhancement An improvement of existing functionality and removed type/bug labels Mar 30, 2023
@RealFascinated
Copy link

awesome, thanks :)

lunny pushed a commit that referenced this issue Apr 2, 2023
Fixes #23771

Changes the display of different architectures for multiarch images to
show the image size:

![grafik](https://user-images.githubusercontent.com/1666336/228781477-cc76c4d1-4728-434f-8a27-fc008790d924.png)
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/packages type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants