show version in UI

This commit is contained in:
2026-03-09 09:43:13 +11:00
parent c796f1324e
commit 76851f0816
4 changed files with 107 additions and 6 deletions

View File

@@ -12,9 +12,16 @@ RUN go mod download
# Copy the rest of the source
COPY . .
ARG BUILD_TIME=""
ARG GIT_COMMIT="unknown"
ARG VERSION="dev"
# Build a static-ish binary (alpine musl)
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o /out/ingestd ./cmd/ingestd
RUN BUILD_TIME="${BUILD_TIME:-$(date -u +%Y-%m-%dT%H:%M:%SZ)}" && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath \
-ldflags="-s -w -X main.buildTime=${BUILD_TIME} -X main.gitCommit=${GIT_COMMIT} -X main.version=${VERSION}" \
-o /out/ingestd ./cmd/ingestd
# ---- runtime stage ----
FROM alpine:3.22