git-server-docker-stagit

git-server-with-stagit
git clone git://git.andersuno.nu/git-server-docker-stagit.git
Log | Files | Refs | README

commit abe71150154d9235fa9637ff1d41558d2867f215
parent da2d661c91cf03b38a6e041f85caba6255d59feb
Author: Anders <anders@desk.andersuno.nu>
Date:   Thu, 20 Oct 2022 21:45:56 +0200

refactor: New contexts

Put build files into server_context
Added new daemon_context for separate image

Diffstat:
Adaemon_context/Dockerfile | 22++++++++++++++++++++++
Adaemon_context/start.sh | 3+++
RDockerfile -> server_context/Dockerfile | 0
Rgit-shell-commands/new-repo -> server_context/git-shell-commands/new-repo | 0
Rgit-shell-commands/no-interactive-login -> server_context/git-shell-commands/no-interactive-login | 0
Rresources/favicon.png -> server_context/resources/favicon.png | 0
Rresources/logo.png -> server_context/resources/logo.png | 0
Rresources/style.css -> server_context/resources/style.css | 0
Rsshd_config -> server_context/sshd_config | 0
Rstart.sh -> server_context/start.sh | 0
10 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/daemon_context/Dockerfile b/daemon_context/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.15 + +# "--no-cache" is new in Alpine 3.3 and it avoid using +# "--update + rm -rf /var/cache/apk/*" (to remove cache) +RUN apk add --no-cache git-daemon + +WORKDIR /git-server/ + +# -D flag avoids password generation +# -s flag changes user's shell +RUN adduser -D -s /usr/bin/git-shell git \ + && echo git:12345 | chpasswd + +RUN mkdir /git-server/repos + +USER git + +COPY start.sh start.sh + +EXPOSE 9418 + +CMD ["sh", "start.sh"] diff --git a/daemon_context/start.sh b/daemon_context/start.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/bin/git daemon --reuseaddr --base-path=/git-server/repos/ /git-server/repos/ diff --git a/Dockerfile b/server_context/Dockerfile diff --git a/git-shell-commands/new-repo b/server_context/git-shell-commands/new-repo diff --git a/git-shell-commands/no-interactive-login b/server_context/git-shell-commands/no-interactive-login diff --git a/resources/favicon.png b/server_context/resources/favicon.png Binary files differ. diff --git a/resources/logo.png b/server_context/resources/logo.png Binary files differ. diff --git a/resources/style.css b/server_context/resources/style.css diff --git a/sshd_config b/server_context/sshd_config diff --git a/start.sh b/server_context/start.sh