If you’re deploying PiHole to a docker swarm cluster, it’s likely that you’re seeing the container exit after 3 minutes with a status message of “completed” - which is a bit strange, given that it’s a DNS server and its job is only complete when it’s replaced with a new one.

This is a failure of the healthcheck system built into Docker - for some reason, healthy containers are considered “done” and pruned + replace. This…does not make sense.

Fortunately, these checks can be easily disabled:


version: '3.8'
services:
  pihole:
    image: pihole/pihole:latest
    healthcheck:
      disable: true
    # ...rest of your service definition goes here

That’s it! I’m going to investigate the problem a little bit further and figure out exactly why that’s happening, but for the time being, this is a good enough workaround for me.