Currently, I can add an OCI image to an image index using `buildah manifest add` or `podman manifest add`. I'd like to also be able to add local files to an index as artifacts so that I can push them along with regular images.
In regular use, this means either:
- We add an optional `--artifact-type` flag to `manifest add`, which can override the media type recorded in the image index. If the flag is specified, the rest of the arguments are treated as file names rather than image references. This is the preferred option.
- We add `... manifest add-artifact` as a new subcommand for `manifest`. This is a contingency option in case we run into an insoluble implementation problem.
In either case, an optional `-layer-type` flag can be used to set the types of the "layers", with `config` and `-config-type` flags offering a way to supply a config blob and its type to replace the default empty one.
A subsequent `manifest push --all` should be able to pull the layer contents from their locations on disk and upload them as well.
The main trick is going to be crafting the artifact manifest and storing it in a place where it will be found when the artifact or the image index is being pushed to a registry.
- links to