blob: 5896dd5ac4a6873b3ec4b9b6480694aa0deb8e9c [file] [log] [blame]
Tom Rini04549e92021-03-15 13:19:01 -04001GitLab CI / U-Boot runner container
2===================================
3
Simon Glass7aafac02024-11-27 11:17:26 -06004In 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.
5
6The docker image supports both amd64 and arm64. Ensure that the
7'docker-buildx' Debian package is installed (or the equivalent on another
8distribution).
9
10You will need a multi-platform container, otherwise this error is shown::
11
12 ERROR: Multi-platform build is not supported for the docker driver.
13 Switch to a different driver, or turn on the containerd image store, and try again.
14
15You can add one with::
16
17 sudo docker buildx create --name multiarch --driver docker-container --use
18
19Building is supported on both amd64 (i.e. 64-bit x86) and arm64 machines. While
20both amd64 and arm64 happen in parallel, the non-native part will take
21considerably longer as it must use QEMU to emulate the foreign code.
22
23To build the image yourself::
Tom Rini04549e92021-03-15 13:19:01 -040024
25.. code-block:: bash
26
Simon Glass7aafac02024-11-27 11:17:26 -060027 sudo docker buildx build --platform linux/arm64/v8,linux/amd64 -t your-namespace:your-tag .
Tom Rini04549e92021-03-15 13:19:01 -040028
29Or to use an existing container
30
31.. code-block:: bash
32
Mattijs Korpershoek7fe617c2024-04-05 08:16:19 +020033 sudo docker pull trini/u-boot-gitlab-ci-runner:jammy-20240227-14Mar2024