Docker build cache: keep the frontend's node_modules out of Rust builds

The Rust images build from the repository root, and every build copied
services/frontend/node_modules and .next (about 1 GB) into a new layer;
the CI runner's disk filled within a day. They are ignored now (a crate
still includes the tarot deck from services/frontend/src/content).

The CI clean-up pruned with --max-used-space, which deletes nothing with
the containerd image store; it prunes by age (72 hours) instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-23 21:54:27 +00:00
co-authored by Claude Opus 5.5
parent 0d62888831
commit 3e4653fdb2
2 changed files with 10 additions and 2 deletions
+5 -2
View File
@@ -136,8 +136,11 @@ jobs:
docker images "$IMAGE_PREFIX-$svc" --format '{{.Repository}}:{{.Tag}}' | xargs -r docker rmi >/dev/null 2>&1 || true
done
docker image prune -f >/dev/null
# A size cap, not an age: a busy day builds tens of gigabytes.
docker builder prune -af --max-used-space 10GB >/dev/null || true
# By age: with the containerd image store a size cap
# (--max-used-space) prunes nothing. Rust builds no longer carry
# the frontend's node_modules (.dockerignore), so a few days of
# cache stay small; the cargo cache mounts of recent builds stay.
docker builder prune -af --filter until=72h >/dev/null || true
deploy:
needs: build