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

equivalent of docker history #1309

Open
rittneje opened this issue Jun 9, 2021 · 27 comments
Open

equivalent of docker history #1309

rittneje opened this issue Jun 9, 2021 · 27 comments
Labels
kind/feature A request for, or a PR adding, new functionality stale-issue

Comments

@rittneje
Copy link
Contributor

rittneje commented Jun 9, 2021

I am trying to emulate the docker history command via skopeo, to get the instruction and size for each layer. I see I can use skopeo inspect --config to get the instructions ("created_by"), but it doesn't include the layer sizes. Would it be possible to add that?

@mtrmac
Copy link
Collaborator

mtrmac commented Jun 9, 2021

Thanks for your report.

Have you seen https://github.com/containers/podman/blob/master/docs/source/markdown/podman-history.1.md ?

Layer sizes are not present in the config; they do exist in the manifest, but right now skopeo inspect can’t show them (other than using --raw, which to a large extent defeats the purpose).

@rittneje
Copy link
Contributor Author

rittneje commented Jun 9, 2021

I'm not very familiar with podman. Is it capable of producing the history of an image on a remote registry? Or would I have to pull it first?

@rittneje
Copy link
Contributor Author

@mtrmac Following up on this.

@mtrmac
Copy link
Collaborator

mtrmac commented Jun 14, 2021

Podman does require pulling the image first (parts of the history it includes is matching with other local images to report base images, if known).

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@lsm5
Copy link
Member

lsm5 commented Oct 12, 2021

@mtrmac can we close this?

@mtrmac
Copy link
Collaborator

mtrmac commented Oct 12, 2021

@lsm5 The “provide layer sizes” part is a duplicate of #641.

I’m not sure to what extent “equivalent of docker history” is relevant — I read that part like a motivating request for the layer sizes rather than a RFE to implement exactly that. If this is actually a RFE for a docker history lookalike, that would be a reasonable RFE to keep track of, in principle, and I don’t see much reason to close it with haste.

@vrothberg
Copy link
Member

I am very late to the game but think that podman history is the way to go. skopeo could expose the command as well but it would be strictly limited to work with the container-storage tranport only which lets me feel we're better off pointing to podman history.

@rittneje
Copy link
Contributor Author

rittneje commented Mar 22, 2022

@vrothberg podman is way too heavy for our purposes. Also, it seems like skopeo would already have all the information it needs to report this. Can you re-open this issue?

@mtrmac
Copy link
Collaborator

mtrmac commented Mar 22, 2022

@rittneje To report which “this” data exactly are you looking for?

parts of the history (Podman) includes is matching with other local images to report base images, if known

… and that can’t very well be done by Skopeo without access to the “other local images”.

@rittneje
Copy link
Contributor Author

@mtrmac We are looking for the size and instruction for each layer. We don't need to know the name of the base image specifically.

@vrothberg vrothberg reopened this Mar 23, 2022
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rittneje
Copy link
Contributor Author

not stale

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rittneje
Copy link
Contributor Author

not stale

@mtrmac
Copy link
Collaborator

mtrmac commented Jul 28, 2022

This would be made possible by WIP containers/image#1608 .

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rittneje
Copy link
Contributor Author

not stale

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rittneje
Copy link
Contributor Author

not stale

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rittneje
Copy link
Contributor Author

not stale

@mtrmac
Copy link
Collaborator

mtrmac commented Oct 29, 2022

BTW I was reminded of skopeo inspect --config; that does contain the instruction.

And layer sizes are available after #1738 .

So is there actually more that needs to be done?

@rittneje
Copy link
Contributor Author

rittneje commented Oct 31, 2022

@mtrmac It's pretty inconvenient to have to combine the output from skopeo inspect (sizes) and skopeo inspect --config (instructions), especially because there is nothing to directly link the entries. (You have to go by the order but skip entries with "empty_layer": true.) It would be preferable if skopeo inspect --config included the layer sizes in each history entry, or at least the digest.

Another problem is that skopeo inspect seems to give the compressed layer size, while docker history gives the uncompressed size, so they are not interchangeable.

@mtrmac
Copy link
Collaborator

mtrmac commented Oct 31, 2022

That’s fair.

--config is defined to be the OCI config format, so any new fields should instead be made to the non---config mode (for possibly to a entirely new mode.)


Another problem is that skopeo inspect seems to give the compressed layer size, while docker history gives the uncompressed size, so they are not interchangeable.

That information just isn’t available, without actually pulling and decompressing the data.

@rittneje
Copy link
Contributor Author

That information just isn’t available, without actually pulling and decompressing the data.

Ah, that is unfortunate, but we can live it.

@mtrmac mtrmac added the kind/feature A request for, or a PR adding, new functionality label Dec 7, 2022
Copy link

A friendly reminder that this issue had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for, or a PR adding, new functionality stale-issue
Projects
None yet
Development

No branches or pull requests

5 participants