jib
jib copied to clipboard
Enable OCI multi-platform image building
As of now, we only support constructing and pushing a Docker manifest list.
Also consider the case of jib:dockerBuild
and jib:buildTar
(#2743).
~~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)
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.
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.