-
Notifications
You must be signed in to change notification settings - Fork 630
Description
See also:
- Improve
appendcommand - ease the process to push manifests to remote registries from a set of images #891 - How do we set the manifest platform."os.version" property? #1137
- crane: how to copy a sub-set of a image platforms? #1143
There is a pretty obvious need for a command to create/manipulate manifest lists, analogous to crane append. Originally I was hoping to extend crane append to do this, but I think having separate commands for images vs indexes could simplify the UX quite a bit. Also, I just really like the name crane amend.
I would love input from the community around use cases and ideas around the API surface. It's possible that we might need more than one command to cover everything, but the use cases I have in mind seem very related.
Use cases
1. Constructing a new manifest list
This would mirror crane append with no base. I am unsure exactly how to express something like overriding the platform of an image. We discussed this quite a bit in #891 so that might be a reasonable path forward.
2. Appending to an existing manifest list
This seems like i could just be a variant of the first use case where you supply an existing index to amend.
3. Merging existing manifest lists
This feels different enough that it might make sense as a separate command or possibly the composition of two commands?
@imjasonh has implemented this as https://github.com/imjasonh/combine
4. Reducing an existing manifest list to a subset of platforms
Not sure exactly how we would want to express this -- a flag of which platforms/positions to keep or which platforms/positions to remove? For most folks, it's probably most natural to say "I want only these platforms' because it's more declarative and context-independent, but I'm not sure if we want something more expressive/general than this.
Open Questions
- Should it be possible to create an index that references arbitrary mediaTypes, e.g. a layer