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

Support both tag and digest #15

Closed
gnaponie opened this issue Jun 24, 2024 · 2 comments · Fixed by #16
Closed

Support both tag and digest #15

gnaponie opened this issue Jun 24, 2024 · 2 comments · Fixed by #16

Comments

@gnaponie
Copy link

Hello.
Seems like skopeo does not support using both tag and digest: containers/image#1736

This is an error we get when running the script:

skopeo --override-arch=amd64 copy docker://registry.access.redhat.com/ubi9/ubi:latest@sha256:66233eebd72bb5baa25190d4f55e1dc3fff3a9b77186c1f91a0abdb274452072 dir:/tmp/tmpz913lvuu
Invalid source name docker://registry.access.redhat.com/ubi9/ubi:latest@sha256:66233eebd72bb5baa25190d4f55e1dc3fff3a9b77186c1f91a0abdb274452072: Docker references with both a tag and digest are currently not supported

Seems like the script was tested only for image@tag.

Is there any plan to support that in some other way in the script? It seems like a lot of our users would like to specify tag and digest.
Thank you

@lubomir
Copy link
Contributor

lubomir commented Jun 25, 2024

Is the desired behaviour to ensure that the digest matches the tag?

In that case it could be done by pulling the image by tag, and then checking if the digest matches.

@gnaponie
Copy link
Author

The desired goal from us (renovate team) I believe it would be that the script doesn't throw an error. Otherwise we won't update the lockfile. Perhaps it could check if they match. If they don't it could just log a warning and "pick" one of the 2 (maybe the digest?)?

ckelleyRH added a commit to ckelleyRH/rpm-lockfile-prototype that referenced this issue Sep 3, 2024
This was done in konflux-ci#15 for `skopeo copy`, but there is another call
to `skopeo inspect` which was not updated. The _strip_tag function
was moved into utils and made non-private.
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 a pull request may close this issue.

2 participants