Skip to content

fix: bump base image to golang:1.25-alpine to match go.mod requirement#1

Open
varshhhy7 wants to merge 1 commit into
open-gitagent:mainfrom
varshhhy7:fix/dockerfile-go-version
Open

fix: bump base image to golang:1.25-alpine to match go.mod requirement#1
varshhhy7 wants to merge 1 commit into
open-gitagent:mainfrom
varshhhy7:fix/dockerfile-go-version

Conversation

@varshhhy7
Copy link
Copy Markdown

Problem

docker compose up fails on a clean clone with no prior Docker cache:

go: go.mod requires go >= 1.25.0 (running go 1.24.13; GOTOOLCHAIN=local)

The Dockerfile uses golang:1.24-alpine but go.mod specifies go 1.25.0.
This breaks the build for anyone trying to run the project for the first time.

Fix

Bump the build stage base image from golang:1.24-alpine to golang:1.25-alpine.

Tested

Verified docker compose up completes successfully and UI loads at localhost:3000.

Copy link
Copy Markdown
Contributor

@shreyas-lyzr shreyas-lyzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct fix. The root cause is clear: go.mod specifies go 1.25.0 and the Dockerfile was pinned to golang:1.24-alpine, which fails with GOTOOLCHAIN=local since Go 1.21+ enforces version checks.

This is a clean, single-line change that unblocks first-time contributors. No other files need touching — go.sum and go.mod are already correct.

One minor note for maintainers: if you want to avoid this drift in the future, consider pinning with a variable or comment linking the Dockerfile version to go.mod, e.g. # keep in sync with go.mod. Otherwise the version can silently fall behind again.

LGTM — good to merge.

Copy link
Copy Markdown
Contributor

@shreyas-lyzr shreyas-lyzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix — the root cause is exactly right. go.mod requires 1.25 and the build stage was pinned to 1.24, so a clean pull fails hard with no workaround. One-line change to the right place.

One thing worth noting: golang:1.25-alpine is a pretty fresh tag. Depending on your CI cadence, you may want to pin to golang:1.25.0-alpine (an exact patch version) rather than a floating minor tag, so you get reproducible builds and are not surprised by a patch-level Go update mid-release. Not blocking — just something to be aware of.

Copy link
Copy Markdown
Contributor

@shreyas-lyzr shreyas-lyzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct fix. The Dockerfile was pinned to golang:1.24-alpine while go.mod requires go 1.25.0, causing clean-clone builds to fail with GOTOOLCHAIN=local. One-line change, well-scoped.

One thing worth noting: go 1.25 is not yet an official stable release as of mid-2025 (still RC). If this is targeting production, confirm that golang:1.25-alpine is available on Docker Hub and stable enough for your use case. If it is, this is good to merge.

Copy link
Copy Markdown
Contributor

@shreyas-lyzr shreyas-lyzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean and correct. The go.mod / Dockerfile version mismatch was causing first-time build failures for anyone without a cached layer — this is the right fix.

One note for future reference: golang:1.25-alpine does not yet have a stable release tag at the time of writing. If CI starts pulling a non-existent tag after the official release cycle, pinning to a digest or using golang:1.25.0-alpine (once available) would be more reproducible. Not blocking — the intent here is sound and the fix unblocks contributors.

Copy link
Copy Markdown
Contributor

@shreyas-lyzr shreyas-lyzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, correct fix. The Dockerfile build stage was specifying golang:1.24-alpine while go.mod requires go 1.25.0, which breaks any clean clone with GOTOOLCHAIN=local. Bumping to golang:1.25-alpine is the right resolution.

The change is minimal and scoped — no risk of unintended side effects. Good that you included a tested verification in the PR description.

One suggestion for follow-up (not blocking): consider pinning to a specific patch version (e.g. golang:1.25.0-alpine) rather than a floating minor tag so CI builds stay reproducible. Not required for this fix, just worth noting.

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.

2 participants