From 5d780b915f5ac1403903d5ce19f1b1ed3660adc2 Mon Sep 17 00:00:00 2001 From: "Michael G. Noll" Date: Mon, 11 Mar 2024 09:59:13 +0100 Subject: [PATCH] Fix Docker image creation on Apple Silicon computers --- create_image.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/create_image.sh b/create_image.sh index 460b3c3..e297d20 100755 --- a/create_image.sh +++ b/create_image.sh @@ -12,9 +12,9 @@ echo "Building image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG'..." # TIP: Add `--progress=plain` to see the full docker output when you are # troubleshooting the build setup of your image. # -# Force x86_64 as the platform. This workaround is needed on Apple Silicon -# machines. Details at https://stackoverflow.com/questions/70736928/. -declare -r DOCKER_OPTIONS="--platform linux/x86_64/v8" +# Force amd64 as the platform. This workaround is needed on Apple Silicon +# machines. Details at https://stackoverflow.com/questions/72152446/. +declare -r DOCKER_OPTIONS="--platform linux/amd64" # Use BuildKit, i.e. `buildx build` instead of just `build` # https://docs.docker.com/build/ docker buildx build $DOCKER_OPTIONS -t "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG" .