summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rwxr-xr-xDockerfile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 719eab6..fec1cf5 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,10 +3,12 @@ ARG GO_VERSION=1.25
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS build
ARG TARGETOS
ARG TARGETARCH
+# Set by the release workflow from the git tag; --help and /api/instance report it.
+ARG VERSION=dev
WORKDIR /build
COPY . .
-RUN CGO_ENABLED=0 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go build -ldflags "-s -w -extldflags '-static'" && \
+RUN CGO_ENABLED=0 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go build -ldflags "-s -w -extldflags '-static' -X main.version=${VERSION}" && \
echo "skunkyart:x:10000:10000:SkunkyArt user:/:/sbin/nologin" > /etc/minimal-passwd && \
echo "skunkyart:x:10000:" > /etc/minimal-group