diff mbox series

[8/9] doc: Expand what we say about building the docker container a bit

Message ID 20241208190741.4192601-9-trini@konsulko.com
State Accepted
Commit e82922ae119d7d3f337081524cfad936db8d36f8
Delegated to: Tom Rini
Headers show
Series Enable arm64 host support in Gitlab | expand

Commit Message

Tom Rini Dec. 8, 2024, 5:07 p.m. UTC
First, try and be slightly clearer about what "buildx" is with respect
to the docker build process.

Second, now that we build the container for both amd64 and arm64, we
should document how to make a docker "builder" that has multiple nodes.
With this one node should be amd64 and one node arm64, and with
reasonably fast arm64 hardware this will be much quicker than using
QEMU.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Cc: Simon Glass <sjg@chromium.org>
---
 doc/build/docker.rst | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

Comments

Simon Glass Dec. 9, 2024, 3 p.m. UTC | #1
On Sun, 8 Dec 2024 at 12:08, Tom Rini <trini@konsulko.com> wrote:
>
> First, try and be slightly clearer about what "buildx" is with respect
> to the docker build process.
>
> Second, now that we build the container for both amd64 and arm64, we
> should document how to make a docker "builder" that has multiple nodes.
> With this one node should be amd64 and one node arm64, and with
> reasonably fast arm64 hardware this will be much quicker than using
> QEMU.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> Cc: Simon Glass <sjg@chromium.org>
> ---
>  doc/build/docker.rst | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/doc/build/docker.rst b/doc/build/docker.rst
index 5896dd5ac4a6..01ed35050908 100644
--- a/doc/build/docker.rst
+++ b/doc/build/docker.rst
@@ -4,21 +4,29 @@  GitLab CI / U-Boot runner container
 In order to have a reproducible and portable build environment for CI we use a container for building in.  This means that developers can also reproduce the CI environment, to a large degree at least, locally.  This file is located in the tools/docker directory.
 
 The docker image supports both amd64 and arm64. Ensure that the
-'docker-buildx' Debian package is installed (or the equivalent on another
-distribution).
+`buildx` Docker CLI plugin is installed. This is often available in your
+distribution via the 'docker-buildx' or 'docker-buildx-plugin' package.
 
 You will need a multi-platform container, otherwise this error is shown::
 
     ERROR: Multi-platform build is not supported for the docker driver.
     Switch to a different driver, or turn on the containerd image store, and try again.
 
-You can add one with::
+You can add a simple one with::
 
     sudo docker buildx create --name multiarch --driver docker-container --use
 
-Building is supported on both amd64 (i.e. 64-bit x86) and arm64 machines. While
-both amd64 and arm64 happen in parallel, the non-native part will take
-considerably longer as it must use QEMU to emulate the foreign code.
+This will result in a builder that will use QEMU for the non-native
+architectures request in a build.  While both amd64 and arm64 happen in
+parallel, the non-native part will take considerably longer as it must use QEMU
+to emulate the foreign code.  An alternative, if you have accesss to reasonably
+fast amd64 (i.e. 64-bit x86) and arm64 machines is::
+
+    sudo docker buildx create --name multiarch-multinode --node localNode --bootstrap --use
+    sudo docker buildx create --name multiarch-multinode --append --node remoteNode --bootstrap ssh://user@host
+
+And this will result in a builder named multiarch-multinode that will build
+each platform natively on each node.
 
 To build the image yourself::