Skip to content
Permalink
master
Switch branches/tags
Go to file
@unclej84
Latest commit a9ecfee Dec 11, 2020 History
Add filter for prune command to prune only older than 24h
2 contributors

Users who have contributed to this file

@BretFisher @unclej84
version: '3.7'
x-default-opts:
&default-opts
logging:
options:
max-size: "1m"
# driver: "gelf"
# options:
# gelf-address: "udp://127.0.0.1:5000"
services:
image-prune:
<<: *default-opts
image: docker
command: sh -c "while true; do docker image prune -af --filter \"until=24h\"; sleep 86400; done"
networks:
- bridge
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
networks:
bridge:
external: true
name: bridge