* Janitor doen't need privileged mode nor networking - remove "privileged: true" property - add "net: none" property The cleanup tasks runs entirely without networking on /var/run/docker.sock. The calling process can access the docker so it does not need to have privileged mode. Signed-off-by: Mathias Kaufmann <me@stei.gr> * Added boolean question for privileged mode. Signed-off-by: Mathias Kaufmann <me@stei.gr>
17 lines
437 B
YAML
17 lines
437 B
YAML
cleanup:
|
|
image: sshipway/docker-cleanup:1.5.2
|
|
environment:
|
|
CLEAN_PERIOD: ${FREQUENCY}
|
|
DELAY_TIME: "900"
|
|
KEEP_IMAGES: "${KEEP}"
|
|
KEEP_CONTAINERS: "${KEEPC}"
|
|
labels:
|
|
io.rancher.scheduler.global: "true"
|
|
io.rancher.scheduler.affinity:host_label_ne: "${EXCLUDE_LABEL}"
|
|
net: none
|
|
tty: false
|
|
stdin_open: false
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /var/lib/docker:/var/lib/docker
|