blob: 7f1231c4dbe12a5fdf24c99fd97509c25b09eba4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
ARG APP_VERSION
ARG BASE_IMAGE=alpine:3.20
FROM ${BASE_IMAGE} as runtime
RUN apk add --no-cache openssh-server fish git sudo
# default uid for git user who has access to all repos
ENV GIT_UID=1000
ENV GIT_GID=1000
# Modified ssh conf with disabled root login and no password authentication
COPY src/ssh.conf /etc/ssh/sshd_config.d/
COPY src/sudo-git /etc/sudoers.d/
# copy scrips
COPY src/env /usr/local/bin/
COPY src/init /usr/local/bin/
COPY src/git-run /usr/local/bin/
RUN chmod 755 /usr/local/bin/env
RUN chmod 755 /usr/local/bin/init
RUN chmod 755 /usr/local/bin/git-run
COPY src/version /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/init"]
# license information
LABEL org.opencontainers.image.licenses="GPL-3.0-or-later"
LABEL org.opencontainers.image.authors="Matthias Jaros"
LABEL org.opencontainers.image.version="${APP_VERSION}"
LABEL org.opencontainers.image.source="https://github.com/jarlucmat/git-server"
LABEL org.opencontainers.image.url="https://github.com/jarlucmat/git-server"
LABEL org.opencontainers.image.title="git-server"
LABEL org.opencontainers.image.description="A minimal, secure Git server using SSH and Fish."
LABEL org.opencontainers.image.documentation="/usr/share/doc/git-server/LICENSE"
COPY LICENSE /usr/share/doc/git-server/LICENSE
|