Fix the docker buildx multi-platform builds
Fix the docker buildx multi-platform builds in the .build_docker
job.
We have experienced some issues with multi-platform builds:
> [linux/arm64 fgc-test-manager-builder 5/5] RUN /usr/local/custom-tools/build.sh:
#0 0.336 Error while loading /usr/local/custom-tools/build.sh: Exec format error
Apparently, QEMU and/or binfmt was missing on the runner.
According to the documentation, running a container based on the tonistiigi/binfmt
image should configure QEMU and binfmt for multiplatform builds with docker buildx
.
A container based on tonistiigi/binfmt
will be run in before_script
of the .build_docker
job and only if the PLATFORMS
variable is non-empty.
Closes https://gitlab.cern.ch/kubernetes/project/-/issues/592