oras icon indicating copy to clipboard operation
oras copied to clipboard

Pushing an image manifest JSON [feature request]

Open sjackman opened this issue 3 years ago • 5 comments

I'd like to prepare an image manifest JSON myself, and push it to a specified name:tag. For example:

oras push sjackman/hello-world:latest --manifest=image.manifest.json

All of the individual layers have already been pushed.

sjackman avatar Mar 11 '21 08:03 sjackman

It looks to me as if you are trying to use ORAS to build container images, without any other artifacts involved. Please, correct me if I'm wrong.

I don't think ORAS is supposed to be used for this purpose... Have you considered using umoci?

BTW, which version of ORAS are you using? I've used v0.10.0 and v0.11.0 and no option --manifest exists. Could it be that you mean --manifest-config?

Silvanoc avatar Mar 17 '21 09:03 Silvanoc

It looks to me as if you are trying to use ORAS to build container images, without any other artifacts involved. Please, correct me if I'm wrong.

I'm pushing artifacts that happen to be tarballs, and I've added OCI container image metadata to make them look like a container image, even though they're not really..

I don't think ORAS is supposed to be used for this purpose... Have you considered using umoci?

I didn't know about umoci. Thanks for the link! I'll check it out.

BTW, which version of ORAS are you using? I've used v0.10.0 and v0.11.0 and no option --manifest exists. Could it be that you mean --manifest-config?

Sorry, I wasn't clear. The --manifest option doesn't currently exist. That's my feature request. 😁

I have constructed a application/vnd.oci.image.manifest.v1+json JSON file, which is also used by ORAS. I'd like to push and tag that JSON file to an OCI registry.

https://github.com/opencontainers/image-spec/blob/master/manifest.md#image-manifest

sjackman avatar Mar 17 '21 18:03 sjackman

Hi @sjackman, The oras cli is focused on pushing/pulling file[s]. If you're looking to push a manifest, that references existing digests, that is a more generic registry tool that we haven't currently focused on. We are pursing #181, which would split up the oras cli and oras libraries into separate repos. This would allow you to add use the manifest put library (once it's factored out) and build a cli with it. However, if umoci or scope solve your needs, that's also great as we're not trying to replace those tools. We see oras focsed on the non-container image artifacts as there are many tools that focus on the complex details of images.

SteveLasker avatar Apr 07 '21 01:04 SteveLasker

https://github.com/containers/skopeo worked for me! Thanks, Steve. You can close this issue. I now use skopeo to upload the artifacts and either skopeo or oras or curl to download the artifacts.

sjackman avatar Apr 07 '21 20:04 sjackman

Manifest push discussed in https://github.com/oras-project/oras/issues/459 should cover this.

sajayantony avatar Jul 27 '22 21:07 sajayantony

Covered by #472

yizha1 avatar Aug 31 '22 13:08 yizha1

Addressed and closed by #494

shizhMSFT avatar Sep 15 '22 06:09 shizhMSFT