15 lines
526 B
YAML
15 lines
526 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
|
|
deploy:
|
|
mode: global
|
|
restart_policy:
|
|
condition: none
|