google / google/go-containerregistry

`crane append` to all images in an index

Open
#1,456 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

crane lifecycle/frozen
Dominant language
Go
Stars
4.1k
Forks
689
Avg merge
2d 12h
Merged PRs (30d)
26

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the crane append and crane mutate CLI entry points and trace how platform selection and multi-architecture indexes are handled. Define the expected behavior for all-platform, selected-platform, and in-place updates, including whether a flag is required; done means the commands update the intended manifests without changing others.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.