fix(ci): bound Docker build cache with BuildKit cache mounts
CI / check (push) Failing after 2m48s
CI / deploy (push) Skipped

- Move the pnpm store, apk and .next caches into --mount=type=cache so
  dependencies are shared across builds instead of duplicated in fresh
  image layers (was the source of unbounded disk growth).
- Replace the deprecated --keep-storage prune flag in ci-deploy.sh with
  the working --max-used-space=4g (buildx v0.37 renamed the flag). The
  deprecated flag silently did nothing, so the BuildKit cache kept
  growing unbounded (was 15.86GB); it is now capped at 4GB after every
  deploy.
This commit is contained in:
openhands committed 2026-09-08 15:39:13 +02:00
1 parent c4496e710b
commit fabd160250
3 files changed
+23 -8

No files matched your search

+1 -1
View File
@@ -176,5 +176,5 @@ while IFS= read -r tag; do
if [ -n "$tagged_image" ] && [ "$tagged_image" != "$previous_image" ]; then docker image rm "$tag" || true; fi
fi
done < <(docker image ls --format '{{.Repository}}:{{.Tag}}' epicnext-cms)
docker builder prune -af --filter "until=72h" --keep-storage=2g || true
docker builder prune -af --filter "until=72h" --max-used-space=4g || true
docker image prune -f --filter "until=168h" || true