Files
docker/docker_prune/compose.yml
T
2026-06-22 17:13:36 +02:00

16 lines
574 B
YAML

# This docker-compose file defines a service that runs the `docker system prune` command to clean up unused Docker resources.
# The service is set to run in global mode, meaning it will run on all nodes in the Docker swarm, and it will not restart after completion.
#version: '3.7'
services:
system-prune:
image: docker
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
# command: docker system prune --all --force --volumes
command: docker system prune --all --force
deploy:
mode: global
restart_policy:
condition: none