86d3454069
The runner's golangci-lint binary is built with Go 1.24 and refuses
to lint modules targeting a higher Go version ('the Go language
version (go1.24) used to build golangci-lint is lower than the
targeted Go version (1.25)'). 1.24 is current stable and covers
everything the skeleton uses (slog, ServeMux method routing).
Dockerfile pinned to golang:1.24-alpine to match.
Refs: M4.1
16 lines
403 B
Docker
16 lines
403 B
Docker
# Multi-stage build for tenant-registry.
|
|
|
|
FROM golang:1.24-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /out/tenant-registry ./cmd/server
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
WORKDIR /
|
|
COPY --from=build /out/tenant-registry /tenant-registry
|
|
USER nonroot:nonroot
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/tenant-registry"]
|