From 911a7dc7296f76a5de0538b3c3536167a89195d8 Mon Sep 17 00:00:00 2001 From: a73x Date: Sun, 25 Aug 2024 10:04:00 +0100 Subject: add ui --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Dockerfile') 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 -- cgit v1.2.3