https://github.com/drone/drone-gc
Garbage collection of unused docker resources
https://github.com/drone/drone-gc
Last synced: 5 months ago
JSON representation
Garbage collection of unused docker resources
- Host: GitHub
- URL: https://github.com/drone/drone-gc
- Owner: drone
- License: other
- Created: 2018-03-31T07:22:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T16:57:27.000Z (over 3 years ago)
- Last Synced: 2024-06-18T21:47:46.408Z (about 2 years ago)
- Language: Go
- Size: 56.6 KB
- Stars: 73
- Watchers: 6
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
__drone-gc__ is a simple daemon that periodically removes unused docker resources. The garbage collector is optimized for continuous integration systems. It uses an lrfu algorithm to control the size of your image cache, while retaining the most frequently used images.
Installation:
```
docker run -d \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=GC_DEBUG=true \
--env=GC_CACHE=5gb \
--env=GC_INTERVAL=5m \
--restart=always \
--name=gc drone/gc
```
Configuration:
GC_DEBUG- Enable debug mode
GC_DEBUG_PRETTY=false- Pretty print the logs
GC_DEBUG_COLOR=false- Pretty print the logs with color
GC_IGNORE_IMAGES- Comma-separated list of images to ignore. Supports globbing.
GC_IGNORE_CONTAINERS- Comma-separate list of container names to ignore. Support globbing.
GC_INTERVAL=5m- Interval at which the garbage collector is executed
GC_CACHE=5gb- Maximum image cache size
__Need help?__ Please post questions or comments to our [community forum](https://discourse.drone.io/).