mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-12 10:16:48 +00:00
The static-build builder Dockerfiles (agent, kernel, qemu, shim-v2, ovmf,
tools, virtiofsd, busybox, codegen, coco-guest-components, pause-image) and
the agent codegen image hardcoded their base images from Docker Hub
(ubuntu/alpine/busybox/golang). On a builder-image cache miss in CI these
pulls are subject to Docker Hub rate limiting.
Parameterize every FROM with `ARG IMAGE_REGISTRY=docker.io` +
`FROM ${IMAGE_REGISTRY}/...` (default unchanged, so local builds keep using
Docker Hub) and have each component build script forward the value via a new
get_image_registry_build_arg() helper in scripts/lib.sh (only emitted when
IMAGE_REGISTRY is set). kata-deploy-binaries-in-docker.sh forwards
IMAGE_REGISTRY into the build container.
The build-kata-static workflows set IMAGE_REGISTRY=ghcr.io/kata-containers
per-component on the Docker-Hub-only jobs (build-asset, shim-v2, tools) and,
for rootfs, on every asset except cbl-mariner. To keep the fedora
image-builder on its own registry, it now uses a dedicated
IMAGE_BUILDER_REGISTRY (default registry.fedoraproject.org) instead of
sharing IMAGE_REGISTRY, so the rootfs ubuntu/alpine base can be mirrored
without breaking the fedora- and mcr-based image builds.
Authored-by: Cursor <cursor@cursor.com>
Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Kata Containers image generation
A Kata Containers disk image is generated using the image_builder.sh script.
This uses a rootfs directory created by the rootfs-builder/rootfs.sh script.
Creating a guest OS image
To create a guest OS image run:
$ sudo ./image_builder.sh path/to/rootfs
Where path/to/rootfs is the directory populated by rootfs.sh.
Note
: If you are building an image from an Alpine rootfs, see the important note here.
Further information
For more information about usage (including how to adjust the size of the image), run:
$ ./image_builder.sh -h