drb-update: prune BuildKit cache and stale images after every update (#41)
node-002's root disk hit 100% (39.5 GB build cache + 16 GB unused images) and the node silently stopped recording for 17 days: BUILD=1 runs `docker compose build` on every update and nothing ever pruned the cache; the existing prunes only drop dangling images and old src- pins. After `up -d`: `builder prune -af --filter until=72h` and `image prune -af --filter until=168h`. Neither touches anything a running container uses; the age filters keep the next build's cache warm. Disk-free reporting to the portal (the other half of #41) is not in this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9377a94cba
commit
a26a77dd0a
@@ -225,6 +225,14 @@ do_update() {
|
||||
done || true
|
||||
fi
|
||||
docker image prune -f >/dev/null 2>&1 || true
|
||||
|
||||
# node-26#41: neither of the above ever freed BuildKit cache or untagged-
|
||||
# but-unused images, so a BUILD=1 node grew ~40 GB of build cache plus
|
||||
# 16 GB of stale images until the root disk hit 100% and recording silently
|
||||
# stopped (node-002, 17 days). Both prunes skip anything a container uses;
|
||||
# the age filters keep the cache warm for the next build.
|
||||
docker builder prune -af --filter until=72h >/dev/null 2>&1 || true
|
||||
docker image prune -af --filter until=168h >/dev/null 2>&1 || true
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user