diff options
| author | a73x <[email protected]> | 2024-08-25 10:04:00 +0100 |
|---|---|---|
| committer | a73x <[email protected]> | 2024-08-25 10:04:00 +0100 |
| commit | 911a7dc7296f76a5de0538b3c3536167a89195d8 (patch) | |
| tree | 662014839ebed4077e066ed2b86b9e7a0c045185 /Dockerfile | |
| parent | d9ae1cb433a5fe66c3f64b15e5849d11a87d0c53 (diff) | |
add ui
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 |
