buildx icon indicating copy to clipboard operation
buildx copied to clipboard

`imagetools create` should return the digest of the new image

Open Pesa opened this issue 10 months ago • 3 comments

Description

I'm using docker buildx imagetools create to create a multi-platform image from previously built single-platform images.

I'd like this command to somehow output the digest of the newly created image, so that subsequent steps and downstream jobs can "atomically" operate (run some checks, inspect, sign, etc.) on that same version of the image without relying on tags, which can be moved.

docker/build-push-action already has a digest output, so I guess I'm asking for a similar feature in imagetools create.

Pesa avatar Apr 12 '24 23:04 Pesa

@crazy-max Should we add --metadata-file to imagetools create or do you have better ideas for UX. We can also do it for --dry-run that atm. prints the manifest bytes. Digest is just checksum of the same bytes.

tonistiigi avatar Apr 13 '24 00:04 tonistiigi

@crazy-max Should we add --metadata-file to imagetools create or do you have better ideas for UX. We can also do it for --dry-run that atm. prints the manifest bytes. Digest is just checksum of the same bytes.

I think it would be enough to just print the digest imo. Not sure what else we could bring in the metadata file.

crazy-max avatar Aug 30 '24 14:08 crazy-max

Let's move ahead with the suggestion from @tonistiigi

thompson-shaun avatar Sep 19 '24 15:09 thompson-shaun