diff --git a/docker/README.md b/docker/README.md index 2e95ebd3..fc2737ea 100644 --- a/docker/README.md +++ b/docker/README.md @@ -186,8 +186,8 @@ still passes. The `Dockerfile` in the repository root is unrelated to this image. It is the build environment that `generate_linux_binary.sh` uses for the PyInstaller -binary. That script also tags its image `noscribe`, so running it replaces the -image built here; rebuild afterwards or use a different tag for one of them. +binary and tags its image `noscribe-pyinstaller`, so it does not replace the +image built here. ## Files diff --git a/generate_linux_binary.sh b/generate_linux_binary.sh index 185fca37..43fcc935 100644 --- a/generate_linux_binary.sh +++ b/generate_linux_binary.sh @@ -1,4 +1,10 @@ #!/bin/bash +set -euo pipefail -docker buildx build --platform linux/amd64 -t noscribe . -docker run --rm -it --mount type=bind,src=.,dst=/usr/src/app noscribe pyinstaller noScribe-linux.spec \ No newline at end of file +# Builds the Linux binary with PyInstaller inside the build environment from the +# root Dockerfile. The image gets its own tag so it does not replace the +# noScribe image from docker/ (tagged noscribe). +IMAGE=noscribe-pyinstaller + +docker buildx build --platform linux/amd64 -t "$IMAGE" --load . +docker run --rm -it --mount type=bind,src=.,dst=/usr/src/app "$IMAGE" pyinstaller pyinstaller/noScribe_linux.spec