feat: split Dockerfile into dedicated lint stage #31

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

Summary

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

Changes

  • Lint stage: Uses pre-built golangci/golangci-lint:v2.1.6 (pinned by sha256) to run make fmt-check and make lint
  • Build stage: Standard golang:1.24-alpine (pinned by sha256) runs make test and builds both chatd and chat-cli binaries
  • Runtime stage: Unchanged — same Alpine base, same healthcheck, same entrypoint
  • COPY --from=lint /src/go.sum /dev/null creates BuildKit stage dependency to ensure lint always runs
  • All image references pinned by sha256 digest per REPO_POLICIES

Closes #29

## Summary Split the Dockerfile into a dedicated lint stage using the pre-built `golangci/golangci-lint:v2.1.6` image, so lint and formatting failures surface much faster without downloading golangci-lint on every build. ## Changes - **Lint stage**: Uses pre-built `golangci/golangci-lint:v2.1.6` (pinned by sha256) to run `make fmt-check` and `make lint` - **Build stage**: Standard `golang:1.24-alpine` (pinned by sha256) runs `make test` and builds both `chatd` and `chat-cli` binaries - **Runtime stage**: Unchanged — same Alpine base, same healthcheck, same entrypoint - `COPY --from=lint /src/go.sum /dev/null` creates BuildKit stage dependency to ensure lint always runs - All image references pinned by sha256 digest per REPO_POLICIES Closes [#29](https://git.eeqj.de/sneak/chat/issues/29) <!-- session: agent:sdlc-manager:subagent:b640dba6-09b2-4574-8891-757cb72adc9d -->
clawbot added 1 commit 2026-03-02 09:03:45 +01:00
feat: split Dockerfile into dedicated lint stage
All checks were successful
check / check (push) Successful in 6s
3b42620749
Use pre-built golangci/golangci-lint:v2.1.6 image for fast lint feedback
instead of installing golangci-lint from source on every build.

- Lint stage: runs fmt-check and lint using pre-built image
- Build stage: runs tests and compiles binaries
- COPY --from=lint forces BuildKit to execute the lint stage
- All images pinned by sha256 digest
- Runtime stage unchanged
clawbot added the
bot
needs-review
labels 2026-03-02 09:04:17 +01:00
Author
Collaborator

Closing — the referenced issue #30 was already closed.

Closing — the referenced issue #30 was already closed.
clawbot closed this pull request 2026-03-02 09:04:36 +01:00
All checks were successful
check / check (push) Successful in 6s
Required
Details

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/chat#31
No description provided.