Naieve docker container configuration for Apache2 with OpenIDC integration.
This image is based on the work of others: Reposoft (hzandbelt@pingidentity.com, solsson).
Their work has been adapted to suit my personal need for being able to host MKDocs sites in a docker container that can use Keycloak as single sign-on solution.
Many thanks to Zmartzone for their mod_auth_openidc module for Apache2.
- https://github.com/zmartzone/mod_auth_openidc/wiki/Keycloak
- https://github.com/Reposoft/openidc-keycloak-test/tree/master/openidc-jessie
- https://hub.docker.com/r/solsson/httpd-openidc/~/dockerfile/
- https://github.com/zmartzone/mod_auth_openidc/wiki#11-where-can-i-get-binary-packages
- https://github.com/krallin/tini
This can be done for any website you want to host or what else you want to do with apache2.
My usecase is to host MKDocs (with MKDocs Material) websites, so thats my example. I'm sure you can extrapolate the rest from there.
######################################################
################## MULTI-STAGE BUILD
##################
## BUILD
FROM caladreas/mkdocs-docker-build-container:2.0.0 as build
WORKDIR /src
ENV LAST_UPDATE=20180209
ADD . /src
RUN ls -lath /src
RUN mkdocs build
RUN ls -lath /src/site
##################
##################
## RUN
FROM caladreas/apache2-openidc-docker:0.2.0
COPY --from=build /src/site /var/www/html/
##################
######################################################