show version in UI
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user