-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile-alma
24 lines (20 loc) · 1.56 KB
/
dockerfile-alma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG BASEIMAGE=almalinux:minimal
# Multi-Stage build
FROM ${BASEIMAGE} as base
RUN microdnf update --refresh -y --nobest --nodocs --noplugins --setopt=install_weak_deps=0 && microdnf install shadow-utils -y --nobest --nodocs --noplugins --setopt=install_weak_deps=0 && microdnf clean all
FROM base AS builder
ARG DUOVERSION=latest
RUN microdnf update --refresh -y --nobest --nodocs --noplugins --setopt=install_weak_deps=0 && microdnf install gcc wget tar make libffi-devel perl zlib-devel diffutils -y --nobest --nodocs --noplugins --setopt=install_weak_deps=0 && microdnf clean all
RUN mkdir /src && wget https://dl.duosecurity.com/duoauthproxy-$DUOVERSION-src.tgz
RUN tar xvf duoauthproxy-$DUOVERSION-src.tgz -C /src/
RUN cd /src/duoauthproxy-* && make && mv duoauthproxy-build /src/duoauthproxy-build
FROM base as app
ARG DUOVERSION=latest
RUN --mount=type=cache,from=builder,source=/src/duoauthproxy-build,target=/src/duoauthproxy-build ./src/duoauthproxy-build/install --install-dir /opt/duoauthproxy --service-user duo_authproxy_svc --log-group duo_authproxy_grp --create-init-script yes
LABEL org.opencontainers.image.documentation="https://github.com/oliverl-21/duo-auth-proxy_docker"
LABEL org.opencontainers.image.source="https://github.com/oliverl-21/duo-auth-proxy_docker"
LABEL org.opencontainers.image.url="https://github.com/oliverl-21/duo-auth-proxy_docker"
LABEL org.opencontainers.image.description="DUO Authproxy in Docker"
LABEL org.opencontainers.image.version="$DUOVERSION"
LABEL org.opencontainers.image.title="authproxy"
ENTRYPOINT ["/opt/duoauthproxy/bin/authproxy"]