mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-25 14:18:54 +00:00
Building a foreign-arch rootfs/image relied on CROSS_BUILD to enable docker buildx/--platform emulation, a <arch>-linux-gnu-strip stripping tool, an Ubuntu builder installing gcc-<arch>-linux-gnu + libc6-dev-<arch>-cross (via the @ARCH@ template) and config.sh exporting a cross CC. None of this is exercised on our side: rootfs and image are always built on a native-arch runner. Remove the CROSS_BUILD/TARGET_ARCH/BUILDX/PLATFORM plumbing, the cross toolchain/@ARCH@ substitution and the cross CC export; the guest agent is stripped with the native `strip`. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com> Assisted-by: Cursor <cursoragent@cursor.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