Go to file
Dustin 96f4e59cbc buildContainerImage2: Support multiarch OCI images
The `buildContainerImage2` function is an improvement on the existing
`buildContainerImage` function, with a couple of enhancements.
Primarily, it supports building images for multiple architectures.  For
each listed architecture, a pod is launched on a matching worker node to
build the image natively.  The image is exported to an OCI archive and
"stashed" in the Jenkins workspace.  After images for all architectures
are built, another pod is launched and all of the stashed archives are
copied there and assembled into a manifest list.  Finally, the manifest
list is published to the OCI repository as usual, creating tags for the
Git branch and build number.

In addition to adding support for multiarch images, the
`buildContainerImage2` performs image builds in *unprivileged* pods.
Whereas the old function performed builds in a rootful container, the
new one configures requests pods with unique user namespaces.  The build
runs as *root* in the container, but that user is mapped to an arbitrary
unprivileged user on the host.
2023-10-05 22:12:09 -05:00
resources buildContainerImage2: Support multiarch OCI images 2023-10-05 22:12:09 -05:00
vars buildContainerImage2: Support multiarch OCI images 2023-10-05 22:12:09 -05:00
README.md Initial commit 2022-11-06 21:36:25 -06:00

README.md

Container Images Shared Library

This shared library allows jobs to build and publish container images to Gitea very easily:

buildContainerImage()

That's it!