GitHunt
AP

apsega/Docker-Cleanup

Script that clean-ups unused Docker volumes

Docker Cleanup script

This is a simple shell script for the Docker users that struggle with unused container volumes. Script simply looks up at container status from docker ps -a command, filters --filter status=running, compares their volumes with all container volumes in /var/lib/docker/volumes directory and removes directories of not running containers.

Don't use this script if you don't want volume data to be removed of 'not running at the moment' containers.

Languages

Shell100.0%

Contributors

Created December 8, 2015
Updated October 20, 2018