Sign inSign up

cecton/container-cleaner

By cecton

Updated over 10 years ago

Clean docker containers automatically

Image
0

3.6K

cecton/container-cleaner repository overview

container-cleaner

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.

Example

docker run -it --rm \
    -v /run/docker.sock:/tmp/docker.sock \
    cecton/container-cleaner --loop-delay=5 --dry-run

Program Arguments

  • --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)

Tag summary

Content type

Image

Digest

sha256:bd04a943b

Size

15.8 MB

Last updated

over 10 years ago

docker pull cecton/container-cleaner