google / go-containerregistry

Go library and CLIs for working with container registries
Apache License 2.0
3.13k stars 542 forks source link

`crane append` to all images in an index #1456

Open imjasonh opened 2 years ago

imjasonh commented 2 years ago

crane append -f foo.tar -b ${MULTI_ARCH_IMAGE} --platform=all should append the contents of foo.tar onto each image in the base index.

crane mutate --entrypoint=foo ${MULTI_ARCH_IMAGE} --platform=all should modify the entrypoint for each image in the base index.

Similarly crane mutate --platform=linux/amd64,linux/arm64 should pull out only manifests matching those platforms (failing if they aren't matched), and mutate them.

Perhaps more controversially:

crane mutate --entrypoint=foo ${MULTI_ARCH_IAMGE} --platform=linux/arm64 should modify the entrypoint for only that platform, but update it in-place inside the multi-arch index manifest, instead of pulling only that image, modifying it, and pushing only that image.

This would be a change in behavior which might surprise folks, so maybe hide this behind a flag, maybe --in-place?

@jonjohnsonjr wdyt?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Keep fresh with the 'lifecycle/frozen' label.

BobyMCbobs commented 1 year ago

@imjasonh, I believe this is still relevant. May it be re-opened?