gitreef

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b2826797f6f49d7847d87f61d47ee35e77e3f12c
parent 35ed60befe996e5ccb01f66e3156d8dfece6869d
Author: Matthias Jaros <jaros@mailbox.org>
Date:   Sat, 15 Nov 2025 21:52:09 +0100

Added proper init that reaps zombies before they accumulate

Diffstat:
MDockerfile | 7+++++--
Msrc/git-run | 3++-
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -2,7 +2,7 @@ ARG BASE_IMAGE=alpine:latest FROM ${BASE_IMAGE} -RUN apk add --no-cache openssh-server fish git sudo +RUN apk add --no-cache openssh-server fish git sudo tini # default uid for git user who has access to all repos ENV GIT_UID=1000 @@ -23,7 +23,10 @@ RUN chmod 755 /usr/local/bin/git-run COPY src/version /usr/local/bin/ COPY src/banner /usr/local/bin/ -ENTRYPOINT ["/usr/local/bin/init"] +# we need a init that reaps zombies +ENTRYPOINT ["tini"] +# setups users and starts sshd daemon +CMD ["/usr/local/bin/init"] ARG APP_VERSION diff --git a/src/git-run b/src/git-run @@ -78,4 +78,4 @@ begin end &>>$_LOG # execute parsed git command -/usr/bin/sudo -u git /usr/bin/git-shell -c "$gitCommand '$repoDir'" +/usr/bin/sudo -n -u git /usr/bin/git-shell -c "$gitCommand '$repoDir'" +\ No newline at end of file