Add Janitor container definition

This commit is contained in:
Steve Shipway
2016-03-04 01:45:37 +00:00
parent ffc90ce0c5
commit aa7337cfeb
5 changed files with 94 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
cleanup:
image: meltwater/docker-cleanup:1.4.0
environment:
CLEAN_PERIOD: ${FREQUENCY}
DELAY_TIME: "900"
KEEP_IMAGES: ${KEEP}
labels:
io.rancher.scheduler.global: "true"
io.rancher.scheduler.affinity:host_label_ne: ${EXCLUDE_LABEL}
privileged: true
tty: true
stdin_open: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
+25
View File
@@ -0,0 +1,25 @@
.catalog:
name: "Janitor"
version: "v1.4.0"
description: "Docker cleanup"
uuid: janitor-0
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 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"
default: "rancher/agent:v0.8.2,rancher/agent-instance:v0.6.0"
required: false
type: "string"