Split Dockerfile: pre-built golangci-lint stage for faster CI #12

Closed
opened 2026-03-02 08:51:35 +01:00 by clawbot · 1 comment
Collaborator

Goal

Split the Dockerfile into a dedicated lint stage using the pre-built golangci/golangci-lint image, so lint and formatting failures surface much faster without downloading golangci-lint on every build.

Key details

  • Lint stage: golangci/golangci-lint image runs make fmt-check + make lint
  • Build stage: standard Go image runs make test + make build
  • COPY --from=lint /src/go.sum /dev/null creates BuildKit stage dependency (without this, lint is silently skipped)
  • All images pinned by sha256 per REPO_POLICIES
  • Reference: sneak/upaas Dockerfile

Tracked from sdlc-manager#6.

## Goal Split the Dockerfile into a dedicated lint stage using the pre-built golangci/golangci-lint image, so lint and formatting failures surface much faster without downloading golangci-lint on every build. ## Key details - Lint stage: golangci/golangci-lint image runs make fmt-check + make lint - Build stage: standard Go image runs make test + make build - COPY --from=lint /src/go.sum /dev/null creates BuildKit stage dependency (without this, lint is silently skipped) - All images pinned by sha256 per REPO_POLICIES - Reference: [sneak/upaas Dockerfile](https://git.eeqj.de/sneak/upaas/src/branch/main/Dockerfile) Tracked from [sdlc-manager#6](https://git.eeqj.de/clawbot/sdlc-manager/issues/6).
Author
Collaborator

Closing: duplicate of #9.

Closing: duplicate of [#9](https://git.eeqj.de/sneak/simplelog/issues/9).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/simplelog#12