github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/infrastructure/docker/git-ssh/Dockerfile (about) 1 FROM alpine:3.18 2 3 LABEL maintainer="hannesg,sven-urbanski-freiheit-com" 4 LABEL name="git-ssh" 5 LABEL description="Git over SSH with UID/GID handling" 6 7 RUN apk add --no-cache \ 8 git \ 9 openssh 10 11 WORKDIR /git/ 12 13 # The git-shell permits execution only of server-side Git commands implementing 14 # the pull/push functionality, plus custom commands present in a subdirectory 15 # named `git-shell-commands` in the user’s home directory. 16 # [More info](https://git-scm.com/docs/git-shell) 17 COPY ./git-shell-commands/ ./git-shell-commands/ 18 19 COPY ./fix-repos.sh ./sshd_config ./ 20 COPY ./start.sh / 21 COPY ./check.sh / 22 RUN echo '' > /etc/motd && \ 23 chmod u+x \ 24 ./git-shell-commands/* \ 25 ./fix-repos.sh \ 26 /start.sh \ 27 /check.sh && \ 28 mkdir -p \ 29 ./.ssh/ \ 30 ./keys-host/ \ 31 ./keys/ \ 32 ./repos/ 33 34 EXPOSE 22 35 VOLUME ["/git/keys-host/", "/git/keys/", "/git/repos/"] 36 37 HEALTHCHECK CMD sh /check.sh 38 39 CMD ["sh", "/start.sh"]