mirror of
https://github.com/hanzoai/search-go.git
synced 2026-10-30 18:22:58 +00:00
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers, and the test and example pointer helpers went once new(expr) could say them; omitzero is not applied, since it changes what the JSON says. Co-authored-by: Hanzo Dev <[email protected]>
18 lines
473 B
Docker
18 lines
473 B
Docker
FROM golang:1.27.1-bookworm
|
|
# go.mod pins the toolchain. The golang base image sets GOTOOLCHAIN=local,
|
|
# which turns a `go` directive newer than the image into a hard build
|
|
# failure instead of a download.
|
|
ENV GOTOOLCHAIN=auto
|
|
|
|
WORKDIR /home/package
|
|
|
|
RUN git config --global --add safe.directory /home/package
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
|
|
COPY --from=golangci/golangci-lint:v2.3.0 /usr/bin/golangci-lint /usr/local/bin/golangci-lint
|
|
|
|
RUN go mod download
|
|
RUN go mod verify
|