fix(docker): pin templ CLI to the go.mod runtime version - #12
Merged
Conversation
The builder stage ran `go install .../templ@latest`. `@latest` now resolves to v0.3.1020, which requires Go >= 1.25, but the builder is golang:1.24-alpine (GOTOOLCHAIN=local) — so the prod image build fails at `templ generate`. Pin the CLI to v0.3.960 to match go.mod's runtime (requires Go 1.23; builds on the 1.24 builder). Regeneration produces zero diff and `go build ./...` passes. The CI test job was already pinned in #11; this aligns the Dockerfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The post-merge prod build for survey (
Build & Deploy Survey to Prod) failed at the Docker builder stage:@latestdrifted tov0.3.1020, which now requires Go ≥ 1.25, but the builder image isgolang:1.24-alpine. The unit-test job hit the same drift and was pinned in #11; the Dockerfile wasn't, so the prod image build broke.Fix
Pin the builder's templ CLI to
v0.3.960, matching the runtime ingo.mod:v0.3.960requires Go 1.23 → builds on the 1.24 builder ✔templ generatewithv0.3.960produces zero diff vs the committed*_templ.go, andgo build ./...passes ✔Formatting/behavior of the image is unchanged; this only fixes the build.
Note (not in this PR)
Dockerfile:34still installsgolang-migratevia@latest, another unpinned tool that could drift the same way. Left as-is to keep this fix surgical — worth pinning in a follow-up.