Skip to content

[P3] Dockerfile: static non-root build; CI: run tests with -race #52

Closed

Description

@auricom

Priority: P3 (build / CI) · Effort: S

Dockerfile

  • Build with CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" and drop gcc musl-dev and -a -installsuffix cgo. go-ethereum falls back to pure-Go secp256k1, and this tool doesn't sign anything.
  • Pin the runtime image (alpine:3.x or gcr.io/distroless/static:nonroot) instead of alpine:latest, and run as non-root.
  • ✅ Smaller image, faster builds, safer runtime.
  • ⚠️ Smoke-test that the binary still starts (ev-metrics --help).

CI

  • Run tests with -race (Makefile test target or .github/workflows/test.yml). The verifier is heavily concurrent.

Activity

  1. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Additions found while reviewing the open PRs:

  2. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Status after #56 and #58:

    • The Dockerfile builder is now golang:1.26-alpine (Go 1.26 is required by x/net v0.60.0). It still uses CGO_ENABLED=1, -a -installsuffix cgo, and an unpinned alpine:latest running as root.
    • Lint now uses golangci/golangci-lint-action@v8, but with version: latest, so it is still unpinned.
    • actions/checkout@v4 and actions/setup-go@v5 are still on Node 20.
    • No -race in make test and no govulncheck step yet. govulncheck currently reports only GO-2026-5932 (x/crypto, no fix yet), so a CI step needs an allowlist for it or should be informational until upstream fixes it.
  3. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Status after #57–#59: nothing in this issue has changed on main yet. Still open:

  4. added 3 commits that reference this issue on Oct 20, 2026
    eb6dca4
    ebeb4fa
    53be1c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions