diff --git a/Dockerfile.build-musl b/Dockerfile.build-musl index f0763ff1e..24d3265c5 100644 --- a/Dockerfile.build-musl +++ b/Dockerfile.build-musl @@ -12,7 +12,7 @@ WORKDIR /app RUN \ --mount=type=cache,target=/var/cache/apk,sharing=shared \ apk update && \ - apk add git curl binutils gcc libc-dev libffi-dev zlib-dev openssl-dev tzdata bash patchelf python3-dev musl-dev pkgconfig cargo + apk add git curl binutils gcc libc-dev libffi-dev zlib-dev openssl-dev tzdata bash python3-dev musl-dev pkgconfig cargo # from https://cryptography.io/en/latest/installation/#building-cryptography-on-linux # If you get an error with openssl-dev you may have to use libressl-dev. # cargo @@ -39,6 +39,15 @@ COPY pyproject.toml . COPY src src/ # staticx must be installed after scons # staticx gives error: Error relocating /tmp/staticx-pyi-9b5nvfi_/_cffi_backend.cpython-312-x86_64-linux-musl.so: PyNumber_Long: symbol not found, so not using for musl +# cryptography build on arm32v7 is hanging with patchelf present, so doing separate steps +RUN \ + --mount=type=cache,target=/root/.cache/pip,sharing=shared \ + python3 -m venv .venv && \ + . .venv/bin/activate && \ + pip3 install --disable-pip-version-check cryptography +RUN \ + --mount=type=cache,target=/var/cache/apk,sharing=shared \ + apk add patchelf RUN \ --mount=type=cache,target=/root/.cache/pip,sharing=shared \ python3 -m venv .venv && \