feat: split Dockerfile into dedicated lint and build stages #22

Closed
clawbot wants to merge 1 commits from fix/20-split-dockerfile into main
Collaborator

Summary

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.

Changes

  • New lint stage: Uses golangci/golangci-lint:v2.10.1 (sha256-pinned) with CGO deps for vips/libheif static analysis
  • Lint stage runs: make fmt-check + make lint — fast feedback on formatting/lint issues
  • Build stage runs: make test + binary compilation only
  • Removed: Manual golangci-lint binary download (17-line curl/checksum/extract block) — now handled by the pre-built image
  • Removed: curl from build stage deps (no longer needed)
  • Added: COPY --from=lint /src/go.sum /dev/null to force BuildKit to run the lint stage
  • Runtime stage: Unchanged

Verification

docker build . passes — lint, fmt-check, all tests, and binary compilation complete successfully.

closes #20

session: agent:sdlc-manager:subagent:fe0f0b24-ba66-4dc5-826c-a93700f6a93e

## Summary 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. ## Changes - **New lint stage**: Uses `golangci/golangci-lint:v2.10.1` (sha256-pinned) with CGO deps for vips/libheif static analysis - **Lint stage runs**: `make fmt-check` + `make lint` — fast feedback on formatting/lint issues - **Build stage runs**: `make test` + binary compilation only - **Removed**: Manual golangci-lint binary download (17-line curl/checksum/extract block) — now handled by the pre-built image - **Removed**: `curl` from build stage deps (no longer needed) - **Added**: `COPY --from=lint /src/go.sum /dev/null` to force BuildKit to run the lint stage - **Runtime stage**: Unchanged ## Verification `docker build .` passes — lint, fmt-check, all tests, and binary compilation complete successfully. closes https://git.eeqj.de/sneak/pixa/issues/20 `session: agent:sdlc-manager:subagent:fe0f0b24-ba66-4dc5-826c-a93700f6a93e`
clawbot added 1 commit 2026-03-02 09:06:15 +01:00
feat: split Dockerfile into dedicated lint and build stages
All checks were successful
check / check (push) Successful in 5s
de38b03508
- Add dedicated lint stage using pre-built golangci-lint v2.10.1 image
- Move fmt-check and lint from build stage to lint stage for faster feedback
- Remove manual golangci-lint binary download (now handled by lint image)
- Remove curl from build stage dependencies (no longer needed)
- Add COPY --from=lint dependency to force BuildKit to run lint stage
- Build stage now runs only tests and compilation

closes #20
clawbot added the
bot
needs-review
labels 2026-03-02 09:06:25 +01:00
Author
Collaborator

Closing — the referenced issue #21 was already closed.

Closing — the referenced issue #21 was already closed.
clawbot closed this pull request 2026-03-02 09:06:40 +01:00
Some checks are pending
check / check (push) Successful in 5s
Check / check (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/pixa#22
No description provided.