jib icon indicating copy to clipboard operation
jib copied to clipboard

Enable OCI multi-platform image building

Open chanseokoh opened this issue 3 years ago • 3 comments

As of now, we only support constructing and pushing a Docker manifest list.

Also consider the case of jib:dockerBuild and jib:buildTar (#2743).

chanseokoh avatar Sep 03 '20 16:09 chanseokoh

~~Regarding building a tar there should also be an option to build an OCI tar which can store multi-arch images (https://github.com/opencontainers/image-spec/blob/main/image-layout.md). Similar to docker buildx build --output=type=oci,dest=image.tar ...~~ Sorry, found out that it should already be possible (https://github.com/GoogleContainerTools/jib/pull/2181)

SgtSilvio avatar Jun 16 '22 21:06 SgtSilvio

This can leverage the work done for #2749 Impacted class should be https://github.com/GoogleContainerTools/jib/blob/master/jib-core/src/main/java/com/google/cloud/tools/jib/image/json/ManifestListGenerator.java#L47-L49

I guess the choice between V22ManifestListTemplate or OciIndexTemplate should be driven by the already existing configuration container ImageFormat = Docker vs OCI ? Because I don't see why someone would want to generate a V22ManifestTemplate inside an OciIndexTemplate, or an OciManifestTemplate inside a V22ManifestListTemplate.

rquinio avatar Aug 24 '22 21:08 rquinio

Might be a little off-topic: The Gradle OCI Plugin (https://github.com/SgtSilvio/gradle-oci) might be interesting for those looking to build multi-arch OCI images.

SgtSilvio avatar Feb 17 '24 15:02 SgtSilvio