1
0
mirror of https://gitlab.com/jarylc/docker-duoauthproxy.git synced 2026-02-04 17:24:43 +00:00

use alpine native py3-cryptography package to fix arm builds

This commit is contained in:
Jaryl Chng
2024-04-12 10:21:28 +08:00
parent 6e7d6c667c
commit 873c57552c

View File

@@ -6,7 +6,7 @@ ARG CHECKSUM
ARG PYTHON_VERSION=3.11 ARG PYTHON_VERSION=3.11
RUN apk add --no-cache build-base libffi-dev perl zlib-dev diffutils libstdc++ gcompat \ RUN apk add --no-cache build-base libffi-dev perl zlib-dev diffutils libstdc++ gcompat \
bash wget py3-cffi py3-zope-interface bash wget py3-cffi py3-zope-interface py3-cryptography
RUN wget -O duoauthproxy.tgz https://dl.duosecurity.com/duoauthproxy-${VERSION}-src.tgz RUN wget -O duoauthproxy.tgz https://dl.duosecurity.com/duoauthproxy-${VERSION}-src.tgz
RUN echo "${CHECKSUM} duoauthproxy.tgz" | sha256sum -c RUN echo "${CHECKSUM} duoauthproxy.tgz" | sha256sum -c
RUN tar xzf duoauthproxy.tgz RUN tar xzf duoauthproxy.tgz
@@ -15,6 +15,7 @@ RUN mkdir -p duoauthproxy-build/usr/local/lib/python${PYTHON_VERSION}/
RUN cp -R /usr/lib/python3.11/site-packages duoauthproxy-build/usr/local/lib/python${PYTHON_VERSION}/ RUN cp -R /usr/lib/python3.11/site-packages duoauthproxy-build/usr/local/lib/python${PYTHON_VERSION}/
RUN sed -i '/$(CFFI) \\/d' Makefile RUN sed -i '/$(CFFI) \\/d' Makefile
RUN sed -i '/$(ZOPE_INTERFACE) \\/d' Makefile RUN sed -i '/$(ZOPE_INTERFACE) \\/d' Makefile
RUN sed -i '/$(CRYPTOGRAPHY) \\/d' Makefile
RUN make RUN make
RUN LD_PRELOAD=libgcompat.so.0 duoauthproxy-build/install --install-dir /app --service-user nobody --log-group nobody --create-init-script no --enable-selinux=no RUN LD_PRELOAD=libgcompat.so.0 duoauthproxy-build/install --install-dir /app --service-user nobody --log-group nobody --create-init-script no --enable-selinux=no
RUN rm -rf /app/usr/local/lib/python${PYTHON_VERSION}/test RUN rm -rf /app/usr/local/lib/python${PYTHON_VERSION}/test