aboutsummaryrefslogtreecommitdiff
path: root/cgit/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'cgit/Dockerfile')
-rw-r--r--cgit/Dockerfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/cgit/Dockerfile b/cgit/Dockerfile
new file mode 100644
index 0000000..e89b8d3
--- /dev/null
+++ b/cgit/Dockerfile
@@ -0,0 +1,23 @@
+FROM nginx:1.29.7-alpine-slim
+ARG DOMAIN=localhost
+
+RUN set -x \
+ && apk add --no-cache cgit fcgiwrap envsubst
+
+RUN apk update && apk update
+
+COPY 40-fcgiwrap.sh /docker-entrypoint.d/
+RUN chmod +x /docker-entrypoint.d/40-fcgiwrap.sh
+
+COPY cgitrc /etc/
+
+COPY site.template /
+RUN sed "s/\$DOMAIN/$DOMAIN/g" /site.template > /etc/nginx/conf.d/default.conf
+RUN rm /site.template
+
+RUN addgroup nginx www-data
+
+#RUN sed -i -Ee 's/pid\s+.*;/pid \/tmp\/nginx.pid;/' /etc/nginx/nginx.conf
+#RUN sed -i -Ee 's/error_log\s+.*;/error_log \/dev\/stdout;/' /etc/nginx/nginx.conf
+#
+#USER nginx