summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 67f15b6..1dfb37b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -28,11 +28,8 @@ FROM httpd:${APACHE_VERSION}
RUN apk add --no-cache luajit
-RUN addgroup -g 1000 cgit \
- && adduser -D -H -u 1000 -G cgit cgit
-
-RUN sed -i 's/^User www-data/User cgit/' /usr/local/apache2/conf/httpd.conf
-RUN sed -i 's/^Group www-data/Group cgit/' /usr/local/apache2/conf/httpd.conf
+RUN sed -i 's/^\(User\) www-data/\1 cgit/' /usr/local/apache2/conf/httpd.conf
+RUN sed -i 's/^\(Group\) www-data/\1 cgit/' /usr/local/apache2/conf/httpd.conf
RUN sed -i 's/#\(LoadModule cgi_module\)/\1/' /usr/local/apache2/conf/httpd.conf
RUN sed -i 's/#\(LoadModule cgid_module\)/\1/' /usr/local/apache2/conf/httpd.conf
RUN echo -e "\n#cgit configuration\nInclude conf/extra/cgit.conf" >> /usr/local/apache2/conf/httpd.conf
@@ -41,7 +38,12 @@ ENV CGIT_APP_USER=cgit
COPY ./rootfs/ /
COPY --from=build /opt/cgit /opt/cgit
-RUN chown cgit:cgit -R /opt/cgit
+RUN chmod 755 -R /opt/cgit
+
+COPY entrypoint.sh /usr/local/bin/entrypoint.sh
+RUN chmod +x /usr/local/bin/entrypoint.sh
VOLUME ["/opt/git"]
+ENTRYPOINT ["entrypoint.sh"]
+CMD ["httpd-foreground"]
EXPOSE 80