mirror of
https://github.com/hanzoai/ingress.git
synced 2026-10-20 15:07:40 +00:00
build: pin the Go builder to 1.26.5 and let the toolchain download
The official golang images set GOTOOLCHAIN=local, so a go.mod `go` directive
newer than the base image fails the build at the first go command:
go: go.mod requires go >= 1.26.5 (running go 1.26.4; GOTOOLCHAIN=local)
Two orthogonal changes. Pinning the base to the exact patch go.mod names makes
the build hermetic — the versions match, so no toolchain is downloaded.
GOTOOLCHAIN=auto is the resilience half: when go.mod next moves ahead of the
pin, the toolchain is fetched and checksum-verified against sum.golang.org
instead of failing the build outright.
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
+5
-1
@@ -12,7 +12,11 @@ COPY webui/ ./
|
||||
RUN pnpm build
|
||||
|
||||
# ---- Stage 2: Build Go binary ----
|
||||
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.26.5-alpine AS builder
|
||||
# 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
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
|
||||
Reference in New Issue
Block a user