]> Untitled Git - web-git-daemon.git/commitdiff
Initial version of dockerized git daemon
authorClifton Palmer <clifton.james.palmer@protonmail.com>
Tue, 10 Dec 2024 10:26:51 +0000 (04:26 -0600)
committerClifton Palmer <clifton.james.palmer@protonmail.com>
Tue, 10 Dec 2024 10:26:51 +0000 (04:26 -0600)
.gitignore [new file with mode: 0644]
Dockerfile [new file with mode: 0644]
docker-compose.yml [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..d9568ca
--- /dev/null
@@ -0,0 +1 @@
+*swp
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..1d18733
--- /dev/null
@@ -0,0 +1,8 @@
+FROM alpine:3.21
+
+EXPOSE 9418
+RUN mkdir -p /srv/git/
+RUN apk add --no-cache git-daemon
+RUN git config --global --add safe.directory "/srv/git/*"
+
+CMD ["/usr/bin/git", "daemon", "--verbose", "--reuseaddr", "--base-path=/srv/git/", "/srv/git/"]
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644 (file)
index 0000000..9036215
--- /dev/null
@@ -0,0 +1,9 @@
+version: '3'
+services:
+    web:
+        build: .
+        image: cjpalmer/git-daemon:0.1.0
+        volumes:
+        - /srv/git:/srv/git:ro
+        ports:
+        - 9418:9418