-
Notifications
You must be signed in to change notification settings - Fork 383
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 Docker image references with tag and digest #1736
Comments
The `sanity-inspect-image` Task is using `skopeo` that currently doesn't support image references containing both tag and digest (see containers/image#1736). The task has been modified to check if the image reference contains both and in that case the tag is removed and digest is used solely to reference the image.
Thanks for your report. Yes, and that’s mostly intentional. The historical reasoning is containers/buildah#1407 (comment) . Since then, https://github.com/moby/moby/releases/tag/v20.10.20 has changed again to the older and less problematic “require both the tag and digest to match” behavior; so that at least removes the strongest reason to completely and strictly reject such input. Still, now we have to worry about c/image users assuming that valid references only have one of (tag, digest), being broken if c/image starts accepting both. That’s just a worry, not a complete show-stopper. But then the benefit of accepting the So… I think it’s definitely worth discussing, but it’s not obvious to me that it’s worth the risk and review effort. |
The `sanity-inspect-image` Task is using `skopeo` that currently doesn't support image references containing both tag and digest (see containers/image#1736). The task has been modified to check if the image reference contains both and in that case the tag is removed and digest is used solely to reference the image.
I see tags carrying classifying information, tagging an image with I don't really care how this is handled internally as outlined in the two different ways Docker handles it on the comment you linked. I'd like to use that :tag@digest syntax and I'd like to propagate it throughout all the tools I use, skopeo being one of them and the issue of skopeo not supporting this syntax originates from containers/images. Seems to me like the second option of, disregarding the tag if the digest is specified would not be difficult to implement, if that's something the project is willing to accept I'd be happy to contribute a pull request. |
Are you saying that you want to intentionally, simultaneously, use That’s seems so disconnected from how the registries actually operate that I think that should be strictly rejected. The tag field is not a general-purpose comment storage space. |
I don't care how registries operate, I care how the tools are used. I want to be certain that an image tagged with |
AFAICS that makes the rolling
There are actually more layers to this: containers/common#1248 at a caller of c/image. c/common values compatibility more; but as the lower infrastructure, c/image is primarily in the business of reliably and correctly doing what the caller asks it to do, or refusing to do it if it can’t be done. That c/common issue might end up requiring the c/image feature to be implemented, purely for compatibility. But it will remain a bad idea to use in production, IMHO. |
Thank you for raising containers/common#1248, I'm looking forward to the conclusion there. |
Using digests to verify floating tags does have a use-case. You run test for a floating tag with digest, and if image passes tests, add non-floating tag for that digest. After which the floating tag can be updated. Digest is extra safety to make sure test results match the final tag. Alternatives, and why they would be worse:
(I assume it's obvious why digest for non-floating tags is desirable.) |
Image tags nicely map to build-job ids (main-25) or git tags (1.20.5) and are human-readable. The digest is good for avoiding surprises in what actually gets run. Yes the VCS / build tag could be put in annotations, but the image name is much more readily available. |
Konflux doesn't support it. See containers/image#1736.
Currently Docker image references with tag and digest are not supported.
This leads to failure when trying to invoke tools that depend on
containers/image
, likeskopeo
:The text was updated successfully, but these errors were encountered: