Install Dockerfile build dependencies through script/bootstrap (closes #95) #156

Merged
clawbot merged 1 commits from issue-95-dockerfile-bootstrap into next 2026-09-29 09:11:22 +02:00
Collaborator

Closes #95.

The Dockerfile lint and build stages each had their own apk add list, a copy of what script/bootstrap installs, so a dependency added to one would not reach the others. Both stages now copy script/, go.mod and go.sum and run script/bootstrap; that layer is reused until one of those files changes. The build adds -trimpath and -s -w.

Worth knowing:

  • script/bootstrap now installs a C compiler when gcc is missing (build-base on Alpine, build-essential on apt): the golang image has none and cgo needs one. The linter image already has gcc. It still installs no linter.
  • In the build stage script/bootstrap also installs git and make, as on any bare host; the final image is unchanged.
  • ARG VERSION moves down to the build step. Declared earlier, a new version reran script/bootstrap and the tests.
  • pixad has no --version flag; the version was checked where the image reports it, as version in /.well-known/healthcheck.json.

Disclosures:

  • Judgement call: Dockerfile.lint, added after the issue was filed, had the same apk add line and now runs script/bootstrap too.
  • Deviation from the policy's example Dockerfile: CGO_ENABLED=1 stays, because govips links libvips.
  • The uncached docker build . stayed within the 5-minute budget.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/pixa/issues/95. The `Dockerfile` lint and build stages each had their own `apk add` list, a copy of what `script/bootstrap` installs, so a dependency added to one would not reach the others. Both stages now copy `script/`, `go.mod` and `go.sum` and run `script/bootstrap`; that layer is reused until one of those files changes. The build adds `-trimpath` and `-s -w`. Worth knowing: - `script/bootstrap` now installs a C compiler when `gcc` is missing (`build-base` on Alpine, `build-essential` on apt): the `golang` image has none and cgo needs one. The linter image already has gcc. It still installs no linter. - In the build stage `script/bootstrap` also installs `git` and `make`, as on any bare host; the final image is unchanged. - `ARG VERSION` moves down to the build step. Declared earlier, a new version reran `script/bootstrap` and the tests. - pixad has no `--version` flag; the version was checked where the image reports it, as `version` in `/.well-known/healthcheck.json`. Disclosures: - Judgement call: `Dockerfile.lint`, added after the issue was filed, had the same `apk add` line and now runs `script/bootstrap` too. - Deviation from the policy's example Dockerfile: `CGO_ENABLED=1` stays, because govips links libvips. - The uncached `docker build .` stayed within the 5-minute budget. Model: opus-5-5
clawbot added the needs-review label 2026-09-29 08:14:31 +02:00
clawbot self-assigned this 2026-09-29 08:14:31 +02:00
clawbot added 1 commit 2026-09-29 08:14:31 +02:00
The Dockerfile lint and build stages and Dockerfile.lint each carried
their own apk add list, a copy of what script/bootstrap installs. They
now copy script/, go.mod and go.sum and run script/bootstrap, so that
layer is reused until one of those changes. script/bootstrap gains a C
compiler check: the golang image has none, and cgo needs one.

The build adds -trimpath and -s -w; CGO_ENABLED=1 stays, as govips
links libvips. ARG VERSION moves to just above the build, so a new
version reruns neither script/bootstrap nor the tests.

Model: opus-5-5
Author
Collaborator

PASS: #95 is met on the current next.

Model: opus-5-5

PASS: https://git.eeqj.de/sneak/pixa/issues/95 is met on the current `next`. Model: opus-5-5
clawbot merged commit 0c99be939a into next 2026-09-29 09:11:22 +02:00
clawbot deleted branch issue-95-dockerfile-bootstrap 2026-09-29 09:11:22 +02:00
clawbot removed the needs-review label 2026-09-29 09:11:23 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/pixa#156