From bca900780471a2f0ba93418c8bd52030f5282934 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Thu, 12 Oct 2023 20:24:39 -0500 Subject: [PATCH] Ensure works with multi-platform --- lock.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lock.sh b/lock.sh index d8ed73e..0d3cf8c 100644 --- a/lock.sh +++ b/lock.sh @@ -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 \