--- networks: watchtower_net: internal: false external: false name: watchtower driver: bridge ipam: driver: default config: - subnet: 172.20.2.0/24 ip_range: 172.20.2.0/24 gateway: 172.20.2.1 driver_opts: com.docker.network.bridge.default_bridge: "false" com.docker.network.bridge.enable_icc: "true" com.docker.network.bridge.enable_ip_masquerade: "true" com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" com.docker.network.bridge.name: "watchtower" com.docker.network.driver.mtu: "1500" labels: com.watchtower.network.description: "is an isolated network." services: watchtower_app: restart: always logging: driver: "json-file" options: max-size: "1M" max-file: "2" container_name: watchtower image: containrrr/watchtower:latest pull_policy: if_not_present volumes: - /var/run/docker.sock:/var/run/docker.sock environment: TZ: Europe/Amsterdam # Adjust the timezone to match your local timezone. You can find the full list of timezones here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. command: ["--schedule", "0 0 * * * *", "--cleanup", "--debug"] hostname: watchtower networks: watchtower_net: ipv4_address: 172.20.2.2 security_opt: - no-new-privileges:true labels: com.docker.compose.project: "watchtower" com.watchtower.description: "a container-based solution for automating Docker container base image updates." healthcheck: disable: true