@@ -47,7 +47,7 @@ The template supports following ways of building container images:
2. Or using [kaniko](https://github.com/GoogleContainerTools/kaniko), an open-source, daemonless tool from Google for building Docker
images, and that solves Docker-in-Docker security issues (and also speeds-up build times).
3. Or using [buildah](https://buildah.io/), an open-source, daemonless tool backed by RedHat for building Docker
images, and that solves Docker-in-Docker security issues (and also speeds-up build times), and can also be configured to run rootless.
images, and that solves Docker-in-Docker security issues (and also speeds-up build times), can also be configured to run rootless or support platform emulation.
By default, the template uses the [kaniko](https://docs.gitlab.com/ci/docker/using_kaniko/) way, but you may
select an alternate build tool by using the `DOCKER_BUILD_TOOL` variable (see below).
Only `buildah` supports building multi-platform images for now.
See [Buildah documentation](https://github.com/containers/buildah/blob/main/docs/buildah-build.1.md#building-an-multi-architecture-image-using-the---manifest-option-requires-emulation-software) for more information about building arguments with different platforms.
Here is a `.gitlab-ci.yaml` that builds a multi architecture manifest to support cross-platform usage:
# select platforms or use --all-platforms to build for all platforms available in our base image.
```
*Note: The `--all-platforms` flag is incompatible with base image including both tag and digest as set by RenovateBot.*
### Using an externally built Docker image
If you want to use the template with an externally built Docker image (scan for vulnerabilities, extract SBOM, test, promote...), you can skip build jobs by setting the `DOCKER_BUILD_TOOL` variable to `external`: