Skip to content

Commit

Permalink
test-site
Browse files Browse the repository at this point in the history
  • Loading branch information
gkostin1966 committed Apr 22, 2024
1 parent 2c49805 commit d260404
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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"]

0 comments on commit d260404

Please sign in to comment.