mirror of
https://gitlab.com/jarylc/docker-duoauthproxy.git
synced 2026-02-07 03:00:37 +00:00
Initial commit
This commit is contained in:
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM alpine:edge AS builder
|
||||
|
||||
ARG VERSION
|
||||
ARG CHECKSUM
|
||||
|
||||
ARG PYTHON_VERSION=3.11
|
||||
|
||||
RUN apk add --no-cache build-base libffi-dev perl zlib-dev diffutils libstdc++ gcompat \
|
||||
bash wget py3-cffi py3-zope-interface
|
||||
RUN wget -O duoauthproxy.tgz https://dl.duosecurity.com/duoauthproxy-${VERSION}-src.tgz
|
||||
RUN echo "${CHECKSUM} duoauthproxy.tgz" | sha256sum -c
|
||||
RUN tar xzf duoauthproxy.tgz
|
||||
WORKDIR duoauthproxy-${VERSION}-src
|
||||
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 sed -i '/$(CFFI) \\/d' Makefile
|
||||
RUN sed -i '/$(ZOPE_INTERFACE) \\/d' Makefile
|
||||
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 rm -rf /app/usr/local/lib/python${PYTHON_VERSION}/test
|
||||
RUN chown -R nobody:nobody /app/conf
|
||||
|
||||
FROM alpine:edge
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache libgcc libffi-dev gcompat su-exec
|
||||
USER 0:0
|
||||
COPY --from=builder /app /app
|
||||
COPY entrypoint.sh /app/entrypoint.sh
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user