From 9f12088da9351a44ee4444b0b38b6d4387306b30 Mon Sep 17 00:00:00 2001 From: GeorgeWebberley Date: Mon, 2 Feb 2026 20:58:52 +0100 Subject: [PATCH] Added README --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f863d2f --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# Image Cleanup + +This repository manages a simple maintenance utility used to keep the server's Docker environment clean. It prevents disk space exhaustion by removing unused data. + +## 🛠️ Functionality + +The service executes a deep cleanup of the Docker system using the following command: + +```bash +docker system prune -af --volumes +``` + +This command removes: +- All stopped containers. +- All networks not used by at least one container. +- All images without at least one container associated with them. +- All build cache. +- All unused volumes. + +## 📅 Automation Schedule + +The cleanup is managed by Woodpecker CI and is triggered in two ways: +- Weekly Cron: A scheduled task that runs once a week to ensure the host doesn't accumulate "cruft" over time. +- Manual Push: Any push to the main branch will trigger an immediate cleanup, allowing for on-demand maintenance. + +## 📂 Repository Structure + +.woodpecker.yaml: Defines the cleanup logic and the triggers (cron and push events). + +## ⚠️ Important Note + +Since this service uses the -a (all) and --volumes flags, it is very thorough. Ensure that any data you wish to persist is explicitly mapped to a persistent volume or handled by a running container, as unreferenced volumes will be purged. \ No newline at end of file