publish: force gzip on every layer so no blob exceeds Cloudflare's 100 MB
Build and Test / Build and Test (push) Successful in 1m12s

bitnami/minideb ships its base layer as an uncompressed 133 MB tar; with
the containerd image store docker push sends it as-is and Cloudflare in
front of Gitea answers 413. Build with force-compression=true (base layer
becomes ~43 MB) and document why.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Miles WardandClaude Fable 5.1 committed 2026-09-17 19:27:05 -04:00
1 parent 557eee9a06
commit 6fa37315d8
2 files changed
+20 -5

No files matched your search

+12 -4
View File
@@ -86,12 +86,20 @@ natives.
The Maven stage runs on the builder's native architecture (the JAR is
architecture-neutral), so only the jlink and runtime stages run under
emulation when building `linux/amd64` on Apple Silicon.
`--provenance=false --sbom=false` matters: Unraid's Docker cannot load the
attestation manifests BuildKit attaches by default.
emulation when building `linux/amd64` on Apple Silicon. Two flags matter:
- `--provenance=false --sbom=false`: Unraid's Docker cannot load the
attestation manifests BuildKit attaches by default.
- `--output type=docker,compression=gzip,force-compression=true`:
`bitnami/minideb` publishes its base layer as an **uncompressed 133 MB
tar**. A daemon using the containerd image store pushes blobs exactly as
stored, and Gitea sits behind Cloudflare, which rejects any request body
over 100 MB with `413 Payload Too Large`. Forcing gzip on every layer takes
that one to about 43 MB; the JAR layer (61 MB) and the JRE layer (41 MB) are
already under the limit.
```bash
docker build --pull --platform linux/amd64 --provenance=false --sbom=false --build-arg "GIT_SHA=$(git rev-parse HEAD)" --build-arg VERSION=0.7.1 --build-arg "BUILD_TIMESTAMP=$(git log -1 --format=%cI)" -t gitea.milesward.dev/mward4/musicbot:0.7.1 -t gitea.milesward.dev/mward4/musicbot:latest .
docker buildx build --pull --platform linux/amd64 --provenance=false --sbom=false --build-arg "GIT_SHA=$(git rev-parse HEAD)" --build-arg VERSION=0.7.1 --build-arg "BUILD_TIMESTAMP=$(git log -1 --format=%cI)" -t gitea.milesward.dev/mward4/musicbot:0.7.1 -t gitea.milesward.dev/mward4/musicbot:latest --output type=docker,compression=gzip,force-compression=true .
```
Smoke test: an empty, writable data directory must produce a `config.txt` and