Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Clean up Orphaned Docker Volumes


This was created to clean up volumes on a Drone CI host that were left behind after builds. The script is
modified from the gist eliasp/7720943

Container Usage

This app can be run as a docker container.

docker build --rm -t volume-cleanup .
docker run -d -v /var/lib/docker:/var/lib/docker -v /var/run/docker.sock:/var/run/docker.sock

The container runs cron -L 15 && tail -F /var/log/ and runs every 5 minutes.

To adjust, just change the interval modify the crontabs/root file with the desired intervals.

Command Usage

Dry Run --noop

Clean up

Adjust log level --loglevel [ 'DEBUG', 'INFO'(default), 'WARN', 'ERROR', 'CRIT' ]
Docker Pull Command
Source Repository