From 3ee1a82d8761902a75e075ccbcd8e9e02a226051 Mon Sep 17 00:00:00 2001 From: Tadas Sutkaitis Date: Thu, 20 Jul 2023 23:44:37 +0200 Subject: add: cross-compile support The main goal is to be able to build ARM images on standard x86 hardware. Add simple functions supported by python-py and podman-py to enable creation of container images on emulated architectures. Change-Id: I1526b460f6e271c2ec63ab3a3b1dc348d742e96d --- doc/source/admin/image-building.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst index f0c0e84c1..81e04f401 100644 --- a/doc/source/admin/image-building.rst +++ b/doc/source/admin/image-building.rst @@ -526,6 +526,28 @@ variables that will be picked up from the user env: Also these variables could be overwritten using ``--build-args``, which have precedence. +Cross-compiling +--------------- + +It is possible to cross-compile container images in order to, e.g., build +``aarch64`` images on a ``x86_64`` machine. + +To build ``ARM`` images on ``x86_64`` platform, pass the ``--base-arch`` and +``--platform`` arguments: + +.. code-block:: console + + kolla-build --platform linux/arm64 --base-arch aarch64 + +.. note:: + + To make this work on x86_64 platform you can use tools like: `qemu-user-static + `_ or `binfmt + `_. + + To make this work on Apple Silicon you can use Docker Desktop or Podman + Desktop to build ``x86_64`` or native ``ARM`` images. + Known issues ============ -- cgit v1.2.3