From d7d25053e09b7006d16125dd3b967b845c599eaf Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 30 Jun 2015 15:32:54 -0700 Subject: [PATCH] initial commit --- README.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..f937b7c --- /dev/null +++ b/README.rst @@ -0,0 +1,35 @@ +Docker Custodian +================ + +Keep docker hosts clean and tidy. + + +dcgc +---- + +Remove old docker containers and docker images. + +``dcgc`` will remove stopped containers and unused images that are older than +"max age". Running containers, and images which are used by a container are +never removed. + +Maximum age can be specificied with any format supported by +`pytimeparse `_. + +Example: + + dcgc --max-container-age 3days --max-image-age 30days + + +dcstop +------ + +Stop containers that have been running for too long. + +``dcstop`` will ``docker stop`` containers where the container name starts +with `--prefix` and it has been running for longer than `--max-run-time`. + + +Example: + + dcstop --max-run-time 2days --prefix "projectprefix_"