--version/-V on the CLI, version in /api/health via Server.SetVersion, Makefile/Dockerfile ldflags stamping from git describe, and a release workflow on v* tags: both binaries for linux/darwin (amd64+arm64) and windows/amd64 with SHA256SUMS attached to the Gitea release (idempotent — reuses an existing hand-written release and skips already-uploaded assets), plus version-tagged Docker images. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
423 B
Docker
22 lines
423 B
Docker
# Build stage
|
|
FROM golang:1.24-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /out/exploredns ./cmd/exploredns
|
|
|
|
# Final stage
|
|
FROM alpine:3.21
|
|
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
COPY --from=builder /out/exploredns /usr/local/bin/exploredns
|
|
|
|
ENTRYPOINT ["exploredns"]
|