services: trivy: image: aquasec/trivy:latest command: server --listen 0.0.0.0:4954 ports: - "4954:4954" volumes: - trivy-cache:/root/.cache/ - /var/run/docker.sock:/var/run/docker.sock:ro deploy: replicas: 1 placement: constraints: - node.role == manager volumes: trivy-cache: