--- services: pihole: container_name: pihole image: pihole/pihole:latest network_mode: "host" env_file: - .env environment: TZ: 'Europe/Rome' DNSMASQ_LISTENING: 'all' volumes: - '/srv/docker/pihole/pihole:/etc/pihole' - '/srv/docker/pihole/dnsmasq.d:/etc/dnsmasq.d' cap_add: # Required if you are using Pi-hole as your DHCP server, else not needed - NET_ADMIN restart: unless-stopped depends_on: - dns dns: container_name: unbound build: context: . dockerfile_inline: | FROM alpinelinux/unbound RUN apk add drill && \ mkdir -p /etc/unbound/ && \ wget -S https://www.internic.net/domain/named.cache -O /etc/unbound/root.hints restart: unless-stopped network_mode: "host" environment: TZ: 'Europe/Rome' volumes: - './pihole.conf:/etc/unbound/unbound.conf' healthcheck: test: drill @127.0.0.1 poldebra.me || exit 1 interval: 60s retries: 5 start_period: 20s timeout: 10s