The Dockerfile fails to build now. I believe this is because the latest mupdf does not have a wheel that is compatible with Alpine's musl C library, and pip tries to compile it but no compiler is installed.
[+] Building 14.1s (10/14) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.26kB 0.0s
=> [internal] load metadata for docker.io/library/node:lts-alpine 0.3s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 68B 0.0s
=> [ 1/10] FROM docker.io/library/node:lts-alpine@sha256:2867d550cf9d8bb50059a0fff528741f11a84d985c732e60e19e8e75c7239c43 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 1.78kB 0.0s
=> CACHED [ 2/10] WORKDIR /usr/src/app 0.0s
=> CACHED [ 3/10] RUN wget https://github.com/pgaskin/kepubify/releases/download/v4.0.4/kepubify-linux-64bit && mv kepubify-linux-64bit /usr/local/bin/kepubify && chmod + 0.0s
=> CACHED [ 4/10] RUN wget https://github.com/zzet/fp-docker/raw/f2b41fb0af6bb903afd0e429d5487acc62cb9df8/kindlegen_linux_2.6_i386_v2_9.tar.gz && echo "9828db5a2c8970d487ada2 0.0s
=> CACHED [ 5/10] RUN apk add --no-cache pipx 0.0s
=> ERROR [ 6/10] RUN pipx install pdfCropMargins 13.8s
------
> [ 6/10] RUN pipx install pdfCropMargins:
0.325 creating virtual environment...
0.358 creating shared libraries...
2.323 upgrading shared libraries...
3.668 installing pdfcropmargins...
13.80 Fatal error from pip prevented installation. Full pip output in file:
13.80 /root/.local/state/pipx/log/cmd_2025-12-04_03.12.42_pip_errors.log
13.80
13.80 pip seemed to fail to build package:
13.80 PyMuPDF>=1.19.6
13.80
13.80 Some possibly relevant errors from pip install:
13.80 error: subprocess-exited-with-error
13.80 /bin/sh: cc: not found
13.80 subprocess.CalledProcessError: Command 'cc --version' returned non-zero exit status 127.
13.80 error: metadata-generation-failed
13.80 Error installing pdfcropmargins.
13.80
------
Dockerfile:25
--------------------
23 | ENV PATH="$PATH:/root/.local/bin"
24 |
25 | >>> RUN pipx install pdfCropMargins
26 |
27 | # Copy files needed by npm install
--------------------
ERROR: failed to solve: process "/bin/sh -c pipx install pdfCropMargins" did not complete successfully: exit code: 1
The Dockerfile fails to build now. I believe this is because the latest mupdf does not have a wheel that is compatible with Alpine's musl C library, and pip tries to compile it but no compiler is installed.