feat(gitea_runner): bound the Docker image cache by count and disk usage

An age-based prune does not cap disk use: the cache grows with how often
new image versions are published, and builds on the runner then fail for
lack of space. Keep the newest N image IDs per repository in the weekly
prune, and add an hourly pressure prune that runs the count prune and a
capped builder prune when the Docker root's filesystem passes a
threshold, behind the same job gate. Both are off by default.

Refs #319

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-11-23 18:04:50 +00:00
1 parent 8e512416e9
commit f50ecc2945
12 files changed
+552 -9

No files matched your search

@@ -0,0 +1,9 @@
---
minor_changes:
- >-
gitea_runner - The Docker prune can bound the image cache by count and by disk use. With
``gitea_runner_docker_prune_keep_per_repository`` above 0 the weekly prune keeps the newest N image IDs of each
repository and removes every other image no container uses. With ``gitea_runner_docker_prune_disk_threshold_percent``
set, a timer (``gitea_runner_docker_prune_disk_check_schedule``, hourly by default) runs the count prune and a builder
prune capped at ``gitea_runner_docker_prune_builder_keep_storage`` when the filesystem holding the Docker root is at
least that full, behind the same job gate as the weekly prune. Both are off by default.