community-catalog/templates/janitor/3/docker-compose.yml
Marc Fournier 0d318696f8 upgrade janitor to latest image version, docker 1.9+ support (#154)
* Janitor: new docker-cleanup image version

The initial motivation for this version bump is support for docker 1.9+
Currently volumes don't get removed properly and lead to containers to
stall at start up, which is a pain to diagnose in rancher.

ref: https://github.com/meltwater/docker-cleanup/issues/24

* janitor: add support for KEEP_CONTAINERS_NAMED feature

* janitor: document '**None**' and '**All**'

* janitor: run with privileged mode unconditionnally

According to @sshipway, it seemed to be incompatible with a lot of
docker/rancher versions.

* janitor: bump docker-cleanup image version to 1.8.0
2016-09-22 13:33:54 -07:00

21 lines
528 B
YAML

cleanup:
image: meltwater/docker-cleanup:1.8.0
environment:
CLEAN_PERIOD: ${FREQUENCY}
DELAY_TIME: "900"
KEEP_IMAGES: "${KEEP}"
KEEP_CONTAINERS: "${KEEPC}"
KEEP_CONTAINERS_NAMED: "${KEEPCN}"
LOOP: "true"
DEBUG: "0"
labels:
io.rancher.scheduler.global: "true"
io.rancher.scheduler.affinity:host_label_ne: "${EXCLUDE_LABEL}"
net: none
privileged: true
tty: false
stdin_open: false
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker