summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index a66b59a..b8039db 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,16 @@
-# Use a base image with Git and OpenSSH installed
FROM alpine:latest
# Install necessary packages
-RUN apk add --no-cache git openssh bash
+RUN apk add --no-cache git openssh bash cgit nginx fcgiwrap spawn-fcgi
# Create a directory for the Git repositories
# RUN mkdir -p /git-server/repos
+COPY cgit/nginx.conf /etc/nginx/http.d/default.conf
+COPY cgit/cgitrc /etc/cgitrc
+
+EXPOSE 80
+
# Create a user for running the Git server with git-shell as the default shell
RUN addgroup -S git && adduser -S git -G git -s /bin/bash && echo "git:*" | chpasswd -e
@@ -17,7 +21,7 @@ RUN addgroup -S git && adduser -S git -G git -s /bin/bash && echo "git:*" | chpa
RUN mkdir -p /home/git/.ssh \
&& chmod 700 /home/git/.ssh \
&& chown -R git:git /home/git/.ssh \
- && chown -R git:git /home/git
+ && chown -R git:nginx /home/git
# Add your SSH public key and restrict to git-shell