fix(docker): build forge with Go 1.26+ (golang:1 base)

The control image build failed: forge v0.6.0 requires Go >= 1.26 but the
forge-builder stage pinned golang:1.22 (GOTOOLCHAIN=local, so no auto-fetch).
Track the latest stable Go via golang:1-bookworm and set GOTOOLCHAIN=auto so a
future forge release needing a newer toolchain resolves itself.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKVyBmKvWDVgrFC9WER2f2
This commit is contained in:
Claude
2026-07-13 17:51:44 +00:00
parent fa2e97130d
commit e96bf25165
+5 -2
View File
@@ -8,8 +8,11 @@
# ---- forge build stage: compile the git-forge CLI (git-pkgs/forge, Go) ----
# Built here and copied into the runtime image as a single static binary, so the runtime
# stage needs no Go toolchain. `forge` gives the CI poller its cross-forge `ci list`.
FROM golang:1.22-bookworm AS forge-builder
ENV CGO_ENABLED=0
# `golang:1` tracks the latest stable Go (forge >= v0.6.0 needs Go 1.26+); GOTOOLCHAIN=auto
# lets `go install` fetch an even newer toolchain if a future forge release requires one.
FROM golang:1-bookworm AS forge-builder
ENV CGO_ENABLED=0 \
GOTOOLCHAIN=auto
RUN go install github.com/git-pkgs/forge/cmd/forge@latest
# ---- build stage: install the package + deps into an isolated venv ----