version: '3.9'

services:
  docker-socket-proxy:
    image: tecnativa/docker-socket-proxy:latest
    user: "0:0"
    environment:
      CONTAINERS: 1
      SERVICES: 1  
      SWARM: 1
      NETWORKS: 1
      NODES: 1
      BUILD: 0
      COMMIT: 0
      CONFIGS: 0
      DISTRIBUTION: 0
      EXEC: 0
      IMAGES: 0
      INFO: 1
      SECRETS: 0
      SESSION: 0
      SYSTEM: 0
      TASKS: 1
      VERSION: 1
      VOLUMES: 0
      EVENTS: 1
      PING: 1
      AUTH: 0
      PLUGINS: 0
      POST: 0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - traefik-public
    deploy:
      placement:
        constraints:
          - node.role == manager
      resources:
        limits:
          memory: 128M
        reservations:
          memory: 64M

networks:
  traefik-public:
    external: true