From 4e66cc2f5982cdab26e3838411a37ea115fd7ef5 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 11 Jun 2026 21:47:52 +0100 Subject: kolla-build: Add Docker BuildKit support via docker buildx build Add --buildkit flag to use docker buildx build instead of the docker-py SDK. An optional --buildkit-builder selects a named buildx builder instance, enabling docker-container or remote drivers for multi-arch builds. --buildkit and --squash are mutually exclusive and rejected at startup. PushTask is skipped when buildkit is active; push is handled inline. Set buildkit as the new default. Change-Id: Idbf1d1bdc091bb84721f8006c2b916731b999859 Signed-off-by: Michal Nasiadka --- doc/source/admin/image-building.rst | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'doc/source/admin') diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst index ff0a4164b..842198470 100644 --- a/doc/source/admin/image-building.rst +++ b/doc/source/admin/image-building.rst @@ -741,6 +741,29 @@ variables that will be picked up from the user env: Also these variables could be overwritten using ``--build-args``, which have precedence. +Docker BuildKit +--------------- + +When using ``--engine docker``, ``kolla-build`` builds images via +``docker buildx build`` (Docker BuildKit) by default. This requires the +``docker-buildx-plugin`` package to be installed. + +To disable BuildKit and fall back to the legacy docker-py SDK, set +``buildkit = False`` in ``kolla-build.conf`` or pass ``--nobuildkit`` on the +command line. + +To use a specific buildx builder instance (e.g. a ``docker-container`` or +remote driver), pass ``--buildkit-builder``: + +.. code-block:: console + + kolla-build --buildkit-builder mybuilder + +.. note:: + + ``--buildkit`` and ``--squash`` are mutually exclusive. Use one or the + other. + Cross-compiling --------------- @@ -756,7 +779,11 @@ To build ``ARM`` images on ``x86_64`` platform, pass the ``--base-arch`` and .. note:: - To make this work on x86_64 platform you can use tools like: `qemu-user-static + Cross-compilation is natively handled by Docker BuildKit; using BuildKit + (the default) is recommended for multi-platform builds. + + To make this work on x86_64 platform with the docker-py based builder + (``--nobuildkit``) you can use tools like: `qemu-user-static `_ or `binfmt `_. -- cgit v1.2.3