Skip to content

Commit 65fde77

Browse files
committed
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.
1 parent ca2be10 commit 65fde77

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ init-buildx:
9999
# Ensure we use a builder that can leverage it (the default on linux will not)
100100
-$(DOCKER) buildx rm multiarch-multiplatform-builder
101101
$(DOCKER) buildx create --use --name=multiarch-multiplatform-builder
102+
$(DOCKER) run --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes
102103
# Register gcloud as a Docker credential helper.
103104
# Required for "docker buildx build --push".
104105
gcloud auth configure-docker --quiet

0 commit comments

Comments
 (0)