Clean docker containers automatically
3.6K
Deletes automatically the containers (including the volumes) that are not running and don't have restart policy.
This is particularly useful to clean completed tasks/jobs on Amazon Web Services ec2 instances.
docker run -it --rm \
-v /run/docker.sock:/tmp/docker.sock \
cecton/container-cleaner --loop-delay=5 --dry-run
--dry-run -n
perform a trial run with no changes made
--loop-delay
sleep a certain delay in seconds (0 to disable, this is the default)
--min-age
only clean containers stopped since a certain time in seconds (0 to disable, this is the default)
Content type
Image
Digest
sha256:bd04a943b…
Size
15.8 MB
Last updated
over 10 years ago
docker pull cecton/container-cleaner