From d2604044d6b32c5b26d4eb6a3392ece86d4de430 Mon Sep 17 00:00:00 2001 From: Greg Kostin Date: Mon, 22 Apr 2024 13:38:30 -0400 Subject: [PATCH] test-site --- apache/Dockerfile | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/apache/Dockerfile b/apache/Dockerfile index deeff48..6c6ca84 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -42,22 +42,6 @@ WORKDIR /lauth/apache/build RUN meson configure -Dtests=true -Dintegration-tests=true && meson compile CMD ["meson", "test", "-v"] -### -FROM httpd:2.4-bullseye AS server -RUN sed -i '1c#!/usr/bin/perl' /usr/local/apache2/cgi-bin/printenv -RUN chmod +x /usr/local/apache2/cgi-bin/printenv - -RUN mkdir -p /lauth - -COPY --from=module /lauth/apache/build/http-check /usr/local/bin/ -COPY --from=module /usr/local/ /usr/local/ -RUN ldconfig - -COPY --from=module /usr/lib/apache2/modules/mod_authn_remoteuser.so /usr/local/apache2/modules/ -COPY --from=module /usr/lib/apache2/modules/mod_lauth.so /usr/local/apache2/modules/ - -COPY ./test-site /lauth/test-site/ -COPY ./apache/conf/* /usr/local/apache2/conf/ ### FROM build-base AS packages @@ -82,6 +66,7 @@ RUN ./mod-lauth/DEBIAN/package COPY ./apache/packages /lauth/apache/packages WORKDIR /lauth/apache/libapache2 +## FROM debian:bullseye-slim AS bullseye RUN apt update; \ apt install -y --no-install-recommends \ @@ -99,6 +84,7 @@ RUN a2enmod authn_remoteuser CMD ["apache2ctl", "-D", "FOREGROUND"] +## FROM debian:bookworm-slim AS bookworm RUN apt update; \ apt install -y --no-install-recommends \ @@ -115,3 +101,12 @@ RUN a2enmod lauth RUN a2enmod authn_remoteuser CMD ["apache2ctl", "-D", "FOREGROUND"] + +### +FROM bullseye AS server + +COPY ./test-site /lauth/test-site +COPY ./apache/conf/test-site.conf /etc/apache2/sites-available/test-site.conf +RUN a2ensite test-site + +CMD ["apache2ctl", "-D", "FOREGROUND"]