Skip to content

Commit

Permalink
move patchelf install
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNikiforov committed Oct 3, 2024
1 parent c4dc6aa commit 2c0885a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile.build-musl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 && \
Expand Down

0 comments on commit 2c0885a

Please sign in to comment.