Skip to content

Commit

Permalink
Fix Docker image creation on Apple Silicon computers
Browse files Browse the repository at this point in the history
  • Loading branch information
miguno committed Mar 11, 2024
1 parent d7ca967 commit 5d780b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions create_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" .

0 comments on commit 5d780b9

Please sign in to comment.