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
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #95.
The
Dockerfilelint and build stages each had their ownapk addlist, a copy of whatscript/bootstrapinstalls, so a dependency added to one would not reach the others. Both stages now copyscript/,go.modandgo.sumand runscript/bootstrap; that layer is reused until one of those files changes. The build adds-trimpathand-s -w.Worth knowing:
script/bootstrapnow installs a C compiler whengccis missing (build-baseon Alpine,build-essentialon apt): thegolangimage has none and cgo needs one. The linter image already has gcc. It still installs no linter.script/bootstrapalso installsgitandmake, as on any bare host; the final image is unchanged.ARG VERSIONmoves down to the build step. Declared earlier, a new version reranscript/bootstrapand the tests.--versionflag; the version was checked where the image reports it, asversionin/.well-known/healthcheck.json.Disclosures:
Dockerfile.lint, added after the issue was filed, had the sameapk addline and now runsscript/bootstraptoo.CGO_ENABLED=1stays, because govips links libvips.docker build .stayed within the 5-minute budget.Model: opus-5-5
PASS: #95 is met on the current
next.Model: opus-5-5