oras icon indicating copy to clipboard operation
oras copied to clipboard

Referring a container image from an artifact set

Open Silvanoc opened this issue 3 years ago • 3 comments

I'd like to push an artifact set that includes binaries, text (JSON config files) and container images. Is there any way to do so in order to let ORAS handle the container images as part of the artifact set? Or is it the only way to get it done adding the container image name to a metadata file?

The key difference is that if ORAS can handle container images as part an artifact set, you can rely on ORAS to get the image pushed (if needed) and to pull it also with the whole artifact set. If it's only a reference in the metadata, then container image management tools (Docker, Buildah, Skopeo,...) are always needed as a 2nd step.

This issue sounds very similar to issues #237 and #238, but has a fundamental difference. The image manifests or indexes (if any) are already uploaded, but I want my artifact to contain a reference to the container image (similar to the manifests list of a container image index).

Silvanoc avatar Mar 17 '21 12:03 Silvanoc

Reading #244, I think what you're referring to here is the ability to push mixed content (an artifact set).

While oras can push a directory, the oras cli focuses on arbitrary content in a directory, and doesn't have knowledge of the specific content.

The concept of references is captured in a proposed oci.artifact.manifest

We have a working implementation with oras at: OCI Artifact Manifest (Experimental)

But, rather than focus on the above proposal, can you help with a more concrete example of the types of references you're looking for?

SteveLasker avatar Apr 07 '21 01:04 SteveLasker

Reading #244, I think what you're referring to here is the ability to push mixed content (an artifact set).

You're right.

While oras can push a directory, the oras cli focuses on arbitrary content in a directory, and doesn't have knowledge of the specific content.

Although oras focuses on arbitrary content, it relies on containerd with knowledge about container image content. My hope was that oras would support it. On the other side, if you stay content agnostic, then some when on time you can move to modules for content management without knowledge about container image content.

The concept of references is captured in a proposed oci.artifact.manifest

Thanks for the link. Looks interesting, I'll have a look at it.

We have a working implementation with oras at: OCI Artifact Manifest (Experimental)

Thanks for the link. Having a reference implementation will probably help getting the specification approved.

But, rather than focus on the above proposal, can you help with a more concrete example of the types of references you're looking for?

I'm mostly experimenting with the tool, because I find it has a lot of potential.

I do have a real use-case, but a small one. My artifact is a combination of one container image, one configuration file and two files. Without the two files, it's like a container image with annotations. And in my company we have container registries capable of hosting OCI artifacts too.

What I can do with oras is having an artifact with the two files and the configuration file referring to a container image name hosted in the same registry. But that's sort of two artifacts (files + configuration and container image) and I was hoping to be able to manage them as a single artifact with oras. Having the container image as part of the artifact blocks pruning from removing it, whereas a name reference doesn't.

Of course I could use container images to host those files and use the annotations of the container image to refer them, but that's too ugly.

Silvanoc avatar Apr 07 '21 06:04 Silvanoc

With support for copy ORAS should handle container images as just another manifest with layers that needs to move. /cc @deitch

sajayantony avatar Sep 28 '21 01:09 sajayantony

Closing this issue due to inactivity. Please re-open if needed.

shizhMSFT avatar Mar 22 '23 10:03 shizhMSFT