aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-09-17 18:40:38 +0200
committerLeonard Kugis <leonard@kug.is>2025-09-17 18:40:38 +0200
commit2d10219c82c4ad62c64f8ae9b3f0710ab4b8c03f (patch)
tree98d918ecaccebffa32c5471b380cf19acdff9b56 /Dockerfile
parent66e96ee1d5a26445603660e805717545eb97ccce (diff)
downloadcgithub-2d10219c82c4ad62c64f8ae9b3f0710ab4b8c03f.tar.gz
Dockerfile: Creating user www-data if not already present.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 59862b1..338a1d7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -52,8 +52,11 @@ RUN echo 'Listen ${APACHE_PORT}' > /etc/apache2/ports.conf && \
COPY cgitrc /etc/
COPY apache.conf /etc/apache2/sites-enabled/
-ENV APACHE_PORT=8080
+ENV APACHE_PORT=80
ENV APACHE_RUN_DIR=/dev/shm
ENV APACHE_SERVER_NAME=cgit
+RUN getent group www-data >/dev/null || addgroup --system --gid 33 www-data \
+ && getent passwd www-data >/dev/null || adduser --system --uid 33 --ingroup www-data --no-create-home www-data
+
ENTRYPOINT ["/sbin/apache2", "-D", "FOREGROUND"]