Skip to content

RFC: crane amend #1144

@jonjohnsonjr

Description

@jonjohnsonjr

See also:

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

  1. Should it be possible to create an index that references arbitrary mediaTypes, e.g. a layer

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions