From c3f0390545daddbfff777e90582cdec62666851c Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 21 May 2021 14:36:34 +0300 Subject: [PATCH] Use the httpd base image for cgit. --- cgit/Dockerfile | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/cgit/Dockerfile b/cgit/Dockerfile index ab69b34..3542a70 100644 --- a/cgit/Dockerfile +++ b/cgit/Dockerfile @@ -1,40 +1,22 @@ -FROM debian:buster-slim +# hadolint ignore=DL3006 +FROM registry.shore.co.il/httpd +USER root # hadolint ignore=DL3008,DL3015 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ - apache2 \ cgit \ groff-base \ - libcap2-bin \ patch \ python3-docutils \ python3-markdown \ python3-pygments \ - wget \ && \ - setcap CAP_NET_BIND_SERVICE=+ep /usr/sbin/apache2 && \ a2enmod cgid && \ a2enconf cgit && \ - a2enmod status && \ install -d -o www-data -g www-data -m 755 /var/cache/cgit && \ - install -d -o www-data -g www-data -m 755 /run/apache2 && \ - install -d -o www-data -g www-data -m 755 /var/log/apache2 && \ - ln -sf /dev/stdout /var/log/apache2/access.log && \ - ln -sf /dev/stderr /var/log/apache2/error.log && \ - ln -sf /dev/stdout /var/log/apache2/other_vhosts_access.log && \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* COPY --chown=root:root patch.diff /root/ COPY --chown=root:root cgitrc /etc/ -ENV APACHE_RUN_DIR=/run/apache2 \ - APACHE_LOG_DIR=/var/log/apache2 \ - APACHE_RUN_USER=www-data \ - APACHE_RUN_GROUP=www-data \ - APACHE_PID_FILE=/run/apache2/apache2.pid RUN patch --strip 0 --verbose --directory /etc/apache2 --input /root/patch.diff && \ apache2 -t -EXPOSE 80 -CMD [ "apache2", "-DFOREGROUND" ] -VOLUME ["/srv/git"] -USER "www-data" -WORKDIR /var/www -HEALTHCHECK CMD wget --spider --quiet http://localhost:80/cgit/ --user-agent 'Healthcheck' || exit 1 +USER www-data -- GitLab