Skip to content

fix: align Dockerfile Go version with go.mod (release blocker) - #21

Merged
prashar32 merged 1 commit into
mainfrom
fix/dockerfile-go-version
May 31, 2026
Merged

fix: align Dockerfile Go version with go.mod (release blocker)#21
prashar32 merged 1 commit into
mainfrom
fix/dockerfile-go-version

Conversation

@prashar32

Copy link
Copy Markdown
Owner

Release blocker found during pre-release container testing. docker build failed at go mod download:

go: go.mod requires go >= 1.25.7 (running go 1.23.12; GOTOOLCHAIN=local)

A dependency forces the go.mod go directive to 1.25.7, but the Dockerfile build stage pinned golang:1.23. CI didn't catch it (Actions use go-version-file: go.mod; only the Dockerfile hardcoded a version), and release.yml's Docker build would have failed the same way on the v0.1.0 tag.

Fix: bump the build stage to golang:1.25 (≥ the go.mod directive) and align CONTRIBUTING.md ("Go 1.25+").

Verified locally (make docker + run):

  • Image rebuilds clean — 19.6 MB, runs nonroot (65532).
  • /healthz → 200, /version stamped, in-container HEALTHCHECK exits 0.
  • Governor enforces a loop budget (3rd step → 402) inside the container.

Fixes #20

⚠️ This should merge before tagging v0.1.0, or the release image build will fail.

The Dockerfile build stage pinned golang:1.23, but a dependency forces the
go.mod `go` directive to 1.25.7, so `docker build` failed at `go mod download`
with "go.mod requires go >= 1.25.7". CI didn't catch it because the Actions
jobs use go-version-file (go.mod) while the Dockerfile hardcoded a version;
the release image build would have failed the same way on the v0.1.0 tag.

Bump the build stage to golang:1.25 and align CONTRIBUTING ("Go 1.25+").
Verified: image rebuilds (19.6 MB, nonroot 65532), /healthz 200, in-container
HEALTHCHECK exits 0, and the governor enforces a loop budget (402) in the
container.

Fixes #20
@prashar32
prashar32 merged commit 230731f into main May 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker build fails: Dockerfile pins golang:1.23 but go.mod requires go >= 1.25.7

1 participant