buildah icon indicating copy to clipboard operation
buildah copied to clipboard

can I change metadata without a new build?_

Open hsenol1 opened this issue 1 year ago • 3 comments

I want to change the tag of the image, from staging to prod. As you may guess, this is for reducing the wasted time while building, because the tests will already be completed while merging. Therefore, there is no need for us to run another build. There are lots of options to change tag, and it is not a problem therefore. However, when I change tag, the creation date still will be same, thus the image will not be at the top of the list in artifact registry. I have to change it (because some of other tools scans the newest images, ArgoCD Image Updater). However, I could not find a way to change metadata without a need for a new build.

hsenol1 avatar May 30 '24 11:05 hsenol1

buildah tag does not work for you then?

@nalind Thoughts?

rhatdan avatar Jun 03 '24 20:06 rhatdan

Which metadata do you mean? The tag isn't part of the image itself, so retagging an image (for example, using buildah tag locally, or by pushing an image to a second repository or tag in a registry) doesn't change its contents.

Modifying the creation date recorded in the image, even without changing anything else, necessarily changes the digest of the image's configuration blob, which is generally used as the image's ID, and that changes the contents and digest of its manifest. At that point, it would be considered a different image.

nalind avatar Jun 03 '24 20:06 nalind

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

github-actions[bot] avatar Jul 04 '24 00:07 github-actions[bot]