Update Dockerfile go version to 1.25 - #878
Conversation
WalkthroughThe Dockerfile’s base image for the app-builder was updated from golang:1.23 to golang:1.25. No other modifications were made. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Dockerfile (1)
24-34: Pin runtime base (avoid latest) and slim the layer.Using debian:latest is non-reproducible and pulls unnecessary packages. Pin to a stable slim variant and clean apt caches.
Apply:
-FROM debian:latest +FROM debian:bookworm-slim @@ -RUN apt-get update && apt-get install ca-certificates -y +RUN apt-get update \ + && apt-get install --no-install-recommends -y ca-certificates \ + && rm -rf /var/lib/apt/lists/*Optional: add a non-root user and drop privileges.
+RUN useradd -r -u 10001 appuser +USER appuser
🧹 Nitpick comments (2)
Dockerfile (2)
15-21: Use standard buildx args (TARGETOS/TARGETARCH) and add cache mounts.Current ARG ARCH may be unset under buildx, yielding host-arch builds. Prefer TARGETOS/TARGETARCH and build cache mounts for speed.
ARG VERSION -ARG ARCH +ARG ARCH +ARG TARGETOS +ARG TARGETARCH @@ -RUN CGO_ENABLED=1 GOOS=linux GOARCH=$ARCH go build -o bin -ldflags="-X github.com/onflow/flow-evm-gateway/api.Version=$VERSION" -trimpath cmd/main.go +RUN --mount=type=cache,target=/go/pkg/mod \ + --mount=type=cache,target=/root/.cache/go-build \ + CGO_ENABLED=1 \ + GOOS=${TARGETOS:-linux} \ + GOARCH=${ARCH:-${TARGETARCH:-amd64}} \ + go build -o bin \ + -ldflags="-s -w -X github.com/onflow/flow-evm-gateway/api.Version=$VERSION" \ + -trimpath cmd/main.go
3-3: Pin builder variant for reproducibility.Explicitly choose a Debian suite to avoid sudden base changes; Alpine may complicate CGO.
-FROM golang:1.25 as app-builder +FROM golang:1.25-bookworm as app-builderIf you need stronger guarantees, pin by digest.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Dockerfile(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: m-Peter
PR: onflow/flow-evm-gateway#738
File: .github/workflows/ci.yml:19-19
Timestamp: 2025-01-29T17:20:28.143Z
Learning: Go 1.23 was released and is available for use in CI/CD pipelines and Docker images.
📚 Learning: 2025-01-29T17:20:28.143Z
Learnt from: m-Peter
PR: onflow/flow-evm-gateway#738
File: .github/workflows/ci.yml:19-19
Timestamp: 2025-01-29T17:20:28.143Z
Learning: Go 1.23 was released and is available for use in CI/CD pipelines and Docker images.
Applied to files:
Dockerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test
🔇 Additional comments (1)
Dockerfile (1)
3-3: Base image bump to Go 1.25 — verify CI/tooling and image availability.
- go.mod confirmed: line 3 -> go 1.25.0.
- .github/workflows search found no go-version/GOVERSION matches; verify CI steps (setup-go actions, build matrices), linters, and other tooling reference 1.25.
- Docker check couldn't run here (docker not installed). Run locally or in CI: docker buildx imagetools inspect docker.io/library/golang:1.25 and confirm the tag exists for required architectures.
Description
The go version was updated to
1.25in thego.modfile, so we need to update the Dockerfile version as well.For contributor use:
masterbranchFiles changedin the Github PR explorerSummary by CodeRabbit