Add updated Janitor template using official meltwater/docker-cleanup

container image rather than the temporary patched version
Some fixes to the README documentation to help clarify behaviour and fix
typos.
This commit is contained in:
sshipway
2016-03-29 21:21:13 +00:00
parent 0817364ed9
commit 5d12e5ebdd
4 changed files with 57 additions and 5 deletions
+18
View File
@@ -0,0 +1,18 @@
cleanup:
image: meltwater/docker-cleanup:1.6.0
environment:
CLEAN_PERIOD: ${FREQUENCY}
DELAY_TIME: "900"
KEEP_IMAGES: "${KEEP}"
KEEP_CONTAINERS: "${KEEPC}"
LOOP: "true"
DEBUG: "0"
labels:
io.rancher.scheduler.global: "true"
io.rancher.scheduler.affinity:host_label_ne: "${EXCLUDE_LABEL}"
privileged: true
tty: false
stdin_open: false
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
+31
View File
@@ -0,0 +1,31 @@
.catalog:
name: "Janitor"
version: "v1.6"
description: "Docker cleanup"
uuid: janitor-2
questions:
- variable: "FREQUENCY"
label: "Frequency"
description: "Run the cleanup on a cycle of this many seconds"
default: 3600
required: true
type: "int"
- variable: "EXCLUDE_LABEL"
label: "Exclude label"
description: "Specify a Rancher host label here that will be used to determine on which hosts the Janitor container should not deploy."
default: janitor.exclude=true
required: true
type: "string"
- variable: "KEEP"
label: "Keep images"
description: "A comma separated list of images that should never be removed. These are left-anchored Bash Shell Wildcard patterns."
default: "rancher/"
required: false
type: "string"
- variable: "KEEPC"
label: "Keep containers"
description: "A comma separated list of images that should never have stopped containers removed. These are left-anchored Bash Shell Wildcard patterns."
default: "*:*"
required: false
type: "string"