-
Notifications
You must be signed in to change notification settings - Fork 807
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
RFE: Make 'skopeo inspect' provide the size of the OCI image #641
Comments
Thanks @debarshiray for the RFE. |
Currently, there's no easy way to get the size of the impending download. Skopeo doesn't offer the size of the OCI image [1] and it's debatable whether another 23 MB binary ought to be pulled in as a dependency just for this. Given that the default fedora-toolbox images are the only base images available via a public repository, the size of the download is hard coded to reflect the approximate size of the fedora-toolbox images. These images are between 451 MB and 483 MB, so 500 MB should be a reasonably suggestive approximate that shouldn't negatively surprise users. [1] containers/skopeo#641 https://github.com/debarshiray/toolbox/issues/134
A friendly reminder that this issue had no activity for 30 days. |
Any progress on this issue?
This does not render the size...
Results:
I am not completely sure how skopeo is doing it sorry, but having this would be very useful! |
That’s not a documented Registry API per https://github.com/distribution/distribution/blob/main/docs/spec/api.md . (But with new enough images we can get sizes of individual blobs, and sum that up.) Overall, sure, a reasonable RFE. Note: Compare also #1309 requesting sizes of individual layers, a rather more invasive output format change. |
@mtrmac are you working on this? If not, could you please point me in the right direction where I will have to make changes? |
I’m not working on this, PRs would be welcome. There are two parts to this:
|
@infiniteregrets are you working on this? |
@lsm5 I tried working on this, but got stuck so I just didnt try again. I would love to give it another try, but busy with school ): Sorry |
@infiniteregrets thanks and no worries. I'll assign a |
A simple method of fetching this information (when the data is present) is with Be aware that this will not work on a
|
A friendly reminder that this issue had no activity for 30 days. |
Is the solution by @WarheadsSE Enough to close this? |
No, why would it be? containers/image#1608 is a possible first step. |
I was asking the reporter. If you think it is important to implement then fine. |
#1738 (see #1738 (comment) for an example) now provides individual layer sizes, if known. |
Yeah, the solution by @WarheadsSE might have been enough to improve Toolbx's UI. However, I am delighted that @ningmingxiao made it easier by removing one step because most of the images Toolbx deals with are |
That's wonderful! I suppose this issue can now be closed, yes. |
Thanks! Note that the individual layer size can be |
This uses 'skopeo inspect' to get the size of the image on the registry, which is usually less than the size of the image in a local containers/storage image store after download (eg., 'podman images'), because they are kept compressed on the registry. Skopeo >= 1.10.0 is needed to retrieve the sizes [1]. However, this doesn't add a hard dependency on Skopeo to accommodate size-constrained operating systems like Fedora CoreOS. If skopeo(1) is missing or too old, then the size of the image won't be shown, but everything else would continue to work as before. Some changes by Debarshi Ray. [1] Skopeo commit d9dfc44888ff71a6 containers/skopeo@d9dfc44888ff71a6 containers/skopeo#641 containers#752 Signed-off-by: Nieves Montero <[email protected]>
This uses 'skopeo inspect' to get the size of the image on the registry, which is usually less than the size of the image in a local containers/storage image store after download (eg., 'podman images'), because they are kept compressed on the registry. Skopeo >= 1.10.0 is needed to retrieve the sizes [1]. However, this doesn't add a hard dependency on Skopeo to accommodate size-constrained operating systems like Fedora CoreOS. If skopeo(1) is missing or too old, then the size of the image won't be shown, but everything else would continue to work as before. Some changes by Debarshi Ray. [1] Skopeo commit d9dfc44888ff71a6 containers/skopeo@d9dfc44888ff71a6 containers/skopeo#641 containers#752 Signed-off-by: Nieves Montero <[email protected]>
It would be nice if 'skopeo inspect' provided the size of the OCI image. It seems like useful information that one might want to have before pulling an image to avoid blowing the data cap or interfering with other network activity.
eg., it could be useful to implement containers/toolbox#134, but it's a different question whether one wants to add a dependency on another 20+ MB binary just for a bit of UI niceness. :)
The text was updated successfully, but these errors were encountered: