feat: package dockreap as proper Python CLI and update README
- Add pyproject.toml for setuptools-based packaging - Rename entrypoint to dockreap.__main__ and expose console script - Update README with pip/pipx installation instructions - Remove obsolete package-manager references - Add MIRRORS file including PyPI endpoint - Align documentation with actual volume usage detection logic
This commit is contained in:
63
README.md
63
README.md
@@ -1,8 +1,11 @@
|
||||
# 🧹 Docker Volume Cleaner
|
||||
[](https://github.com/sponsors/kevinveenbirkenbach) [](https://www.patreon.com/c/kevinveenbirkenbach) [](https://buymeacoffee.com/kevinveenbirkenbach) [](https://s.veen.world/paypaldonate)
|
||||
# 🧹 Docker Volume Cleaner (dockreap)
|
||||
|
||||
[](https://github.com/sponsors/kevinveenbirkenbach)
|
||||
[](https://www.patreon.com/c/kevinveenbirkenbach)
|
||||
[](https://buymeacoffee.com/kevinveenbirkenbach)
|
||||
[](https://s.veen.world/paypaldonate)
|
||||
|
||||
**Docker Volume Cleaner** is a lightweight Python tool that helps you identify and remove unused anonymous Docker volumes — including symlinks and their targets 🗑️
|
||||
**dockreap** is a lightweight Python CLI tool that helps you identify and remove unused **anonymous Docker volumes** — including symlinks and their targets 🗑️
|
||||
|
||||
Keep your Docker environment tidy, automated, and efficient 🚀
|
||||
|
||||
@@ -10,32 +13,43 @@ Keep your Docker environment tidy, automated, and efficient 🚀
|
||||
|
||||
## ⚙️ Features
|
||||
|
||||
- Detects all anonymous Docker volumes (64-character hashes)
|
||||
- Detects anonymous Docker volumes (64-character hash names)
|
||||
- Skips whitelisted volumes
|
||||
- Skips bootstrap mounts (`/var/www/bootstrap`)
|
||||
- Cleans up symlinks **and** their target directories
|
||||
- Optional confirmation prompt via `--no-confirmation`
|
||||
- Pure Python — **no dependencies**
|
||||
- Pure Python — **no external dependencies**
|
||||
|
||||
---
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
Install it using [Kevin’s Package Manager](https://github.com/kevinveenbirkenbach/package-manager) with the alias:
|
||||
### Install from PyPI (recommended)
|
||||
|
||||
```bash
|
||||
pkgmgr install dockreap
|
||||
pip install dockreap
|
||||
```
|
||||
|
||||
> `dockreap` is the alias for this tool within `pkgmgr`.
|
||||
> Repository: [github.com/kevinveenbirkenbach/docker-volume-cleaner](https://github.com/kevinveenbirkenbach/docker-volume-cleaner)
|
||||
or with an isolated environment:
|
||||
|
||||
```bash
|
||||
pipx install dockreap
|
||||
```
|
||||
|
||||
### Install from source (development)
|
||||
|
||||
```bash
|
||||
git clone https://github.com/kevinveenbirkenbach/dockreap.git
|
||||
cd dockreap
|
||||
pip install .
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧪 How to Use
|
||||
## 🧪 Usage
|
||||
|
||||
```bash
|
||||
# Basic usage with confirmation prompt
|
||||
# Basic usage (with confirmation prompt)
|
||||
dockreap
|
||||
|
||||
# Skip confirmation
|
||||
@@ -49,9 +63,20 @@ dockreap "volumeid1 volumeid2" --no-confirmation
|
||||
```
|
||||
|
||||
📝 Notes:
|
||||
- Only volumes with 64-character hash names (anonymous volumes) are considered.
|
||||
- Volumes mounted at `/var/www/bootstrap` are automatically excluded.
|
||||
- If a volume directory is a **symlink**, both the symlink and its target are removed.
|
||||
|
||||
* Only volumes with **64-character hash names** (anonymous volumes) are considered.
|
||||
* Volumes mounted at `/var/www/bootstrap` are automatically excluded.
|
||||
* If a volume’s `_data` directory is a **symlink**, both the symlink **and its target directory** are removed.
|
||||
* Volumes referenced by **any container (running or stopped)** are not deleted.
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Requirements
|
||||
|
||||
* Python ≥ 3.9
|
||||
* Docker CLI available and configured
|
||||
* Sufficient permissions to remove Docker volumes
|
||||
(usually requires `root` or membership in the `docker` group)
|
||||
|
||||
---
|
||||
|
||||
@@ -61,13 +86,9 @@ This project is licensed under the **MIT License**.
|
||||
|
||||
---
|
||||
|
||||
## 🤖 Built with ChatGPT
|
||||
|
||||
Developed with the help of [ChatGPT]([https://chat.openai.com/share/7b177eef-b97f-4e63-b2ef-cfdc69c2337e](https://chatgpt.com/share/67f3c910-2ea0-800f-85db-71ec39a713f2)) 🤝
|
||||
|
||||
---
|
||||
|
||||
## 👤 Author
|
||||
|
||||
**Kevin Veen-Birkenbach**
|
||||
**Kevin Veen-Birkenbach**
|
||||
🌍 [https://www.veen.world/](https://www.veen.world/)
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user