Configure QEMU userspace emulation for Linux build
The Dockerfile uses commands in Linux, which require the correct binfmt
for the architecture we build for. Therefore we need to configure Docker
to use QEMU userspace emulation to build images whose arches are
different from the host machine.
@@ -99,6 +99,7 @@ init-buildx:
# Ensure we use a builder that can leverage it (the default on linux will not)
-$(DOCKER) buildx rm multiarch-multiplatform-builder
$(DOCKER) buildx create --use --name=multiarch-multiplatform-builder
+ $(DOCKER) run --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes
# Register gcloud as a Docker credential helper.
# Required for "docker buildx build --push".
gcloud auth configure-docker --quiet
