zavage-gitea-runner/user_system/gitea-runner-docker-cleanup.service
2026-07-27 00:40:36 -06:00

14 lines
508 B
Desktop File

[Unit]
Description=Prune docker + runner cache (rootless CI cleanup)
[Service]
Type=oneshot
# Environment=DOCKER_HOST=unix:///run/user/1004/docker.sock
Environment=DOCKER_HOST=unix://%t/docker.sock
# keep one week of docker images/build cache, drop the rest
ExecStart=/usr/bin/docker system prune -af --filter until=168h
ExecStart=/usr/bin/docker builder prune -af --filter until=168h
# drop runner cache entries untouched for 2+ weeks
ExecStart=/usr/bin/find %h/.cache/actcache -type f -atime +14 -delete