summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-29 20:43:52 +0100
committerGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-29 20:43:52 +0100
commit379f8c89041e625709f1d0cf921e8f82034f0b63 (patch)
tree2a9c6f18f6f253d566a2928e5b73298c5d57473e
parente4976de4746984cbb8bfc0911400ee445ccd0af2 (diff)
Updated Dockerfile to include variables
-rw-r--r--Dockerfile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 9cd3195..7f1231c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,8 @@
-FROM alpine:3.22.2
+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
@@ -24,9 +28,10 @@ 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 \ No newline at end of file
+COPY LICENSE /usr/share/doc/git-server/LICENSE