mirror of
https://github.com/hanzoai/static.git
synced 2026-10-30 18:22:04 +00:00
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers: SplitSeq, strings.Builder, any, and the builtin min in place of a local one. omitzero is not applied, since it changes what the JSON says. Co-authored-by: Hanzo Dev <[email protected]>
11 lines
259 B
Docker
11 lines
259 B
Docker
FROM golang:1.27.1-alpine AS build
|
|
WORKDIR /app
|
|
COPY go.mod go.sum* ./
|
|
RUN go mod download 2>/dev/null || true
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /static ./cmd/static
|
|
|
|
FROM scratch
|
|
COPY --from=build /static /static
|
|
ENTRYPOINT ["/static"]
|