Canonical Dockerfile note installs lint-phase libraries with apk, but the golangci-lint image is Debian #83

Closed
opened 2026-10-04 03:50:01 +02:00 by clawbot · 1 comment
Collaborator

Found in review of #82. A key point under the canonical Go Dockerfile example in prompts/REPO_POLICIES.md says: "If the project requires CGO or system libraries for linting (e.g. vips-dev), install them in the lint phase with apk add." The lint phase is based on the golangci/golangci-lint image, which is Debian-based and has no apk, so the instruction fails as written; vips-dev is also the Alpine package name (Debian calls it libvips-dev).

Fix

Rewrite that bullet for the Debian image: apt-get update, then apt-get install -y --no-install-recommends of the Debian package name, removing /var/lib/apt/lists/* in the same RUN. Check every other canonical sentence that says how to install a library in the lint phase (git grep -n -i -E "apk|apt-get|vips" -- prompts/) and make it agree. Whether distribution packages must be pinned is the open owner question on #72; this change neither pins nor unpins anything.

Definition of done

  • Verified on a scratch lint phase built from the golangci-lint image prompts/REPO_POLICIES.md pins: the bullet's command as written installs the library, and the old apk add fails. One line per check in the PR, no logs.
  • make check passes.

Model: opus-5-5

Found in review of https://git.eeqj.de/sneak/prompts/pulls/82. A key point under the canonical Go `Dockerfile` example in `prompts/REPO_POLICIES.md` says: "If the project requires CGO or system libraries for linting (e.g. `vips-dev`), install them in the lint phase with `apk add`." The lint phase is based on the `golangci/golangci-lint` image, which is Debian-based and has no `apk`, so the instruction fails as written; `vips-dev` is also the Alpine package name (Debian calls it `libvips-dev`). ## Fix Rewrite that bullet for the Debian image: `apt-get update`, then `apt-get install -y --no-install-recommends` of the Debian package name, removing `/var/lib/apt/lists/*` in the same `RUN`. Check every other canonical sentence that says how to install a library in the lint phase (`git grep -n -i -E "apk|apt-get|vips" -- prompts/`) and make it agree. Whether distribution packages must be pinned is the open owner question on https://git.eeqj.de/sneak/prompts/issues/72; this change neither pins nor unpins anything. ## Definition of done - Verified on a scratch lint phase built from the golangci-lint image `prompts/REPO_POLICIES.md` pins: the bullet's command as written installs the library, and the old `apk add` fails. One line per check in the PR, no logs. - `make check` passes. Model: opus-5-5
clawbot self-assigned this 2026-10-04 03:50:01 +02:00
Author
Collaborator

#95 rewrites the lint-phase note in prompts/REPO_POLICIES.md to install libraries with apt-get under the Debian package name (libvips-dev), deleting the package lists in the same RUN. No other canonical sentence covers installing a library in the lint phase.

Model: opus-5-5

https://git.eeqj.de/sneak/prompts/pulls/95 rewrites the lint-phase note in `prompts/REPO_POLICIES.md` to install libraries with `apt-get` under the Debian package name (`libvips-dev`), deleting the package lists in the same `RUN`. No other canonical sentence covers installing a library in the lint phase. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/prompts#83