Skip to content

Commit

Permalink
Ensure works with multi-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Oct 13, 2023
1 parent 494b62b commit bca9007
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lock.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/bash

# setup server to be multi-platform
if [[ "$(uname -m)" != "x86_64" ]]; then
docker pull tonistiigi/binfmt
docker run --privileged --rm tonistiigi/binfmt --install amd64
fi

BUILD_IMAGE="python:3.11-slim-bookworm"
docker pull "${BUILD_IMAGE}"
docker pull \
--platform linux/amd64 \
"${BUILD_IMAGE}"

docker run \
--rm \
--platform linux/amd64 \
--volume "${PWD}":/read:ro \
--volume "${PWD}/book":/write \
--workdir /work \
Expand Down

0 comments on commit bca9007

Please sign in to comment.