Pi-hole Docker Container with Caddy Docker Container as ReverseProxy

The issue I am facing:
I use Pi-hole in his own official container (Docker Hub) and Caddy V2 in his own official container (Docker Hub) on Raspberry Pi 4 (4GB) in network_mode host, which is working, but want to change that to "regular" docker-networks created with "docker network create".

Pi-hole doesn't start with log entry: "DNS resolution is currently unavailable"

Details about my system:
docker-compose.yml of pi-hole:

version: "3"

services:
  pihole:
    image: pihole/pihole:latest
    ports:
      - 53:53/tcp
      - 53:53/udp
#      - 67:67/udp
#      - 80:80/tcp
      - 1080:1080/tcp
      - 443:443/tcp
    environment:
      - TZ=Europe/Berlin
      - DNS1=10.0.0.1
      - DNS2=IPV6_ADDRESS
      - ServerIP=10.0.1.1
      - IPv6=true
      - ServerIPv6=IPV6_ADDRESS_ROUTER
      - WEBPASSWORD=WEB_PW
      - WEB_PORT=1080
      - VIRTUAL_HOST=pihole.crackpi.lan
      - VIRTUAL_PORT=80
      - PROXY_LOCATION=pihole.crackpi.lan
    volumes:
      - /docker/pihole/etc:/etc/pihole/
      - /docker/pihole/dnsmasq:/etc/dnsmasq.d/
#    network_mode: host
    restart: unless-stopped
    networks:
      - default
      - proxy

networks:
  proxy:
    external: true

docker-compose.yml of caddy:

version: "3"

services:
  caddy:
    image: caddy:latest
    restart: unless-stopped
    ports:
      - 80:80
#      - 443:443
    volumes:
      - $PWD/CaddyFile:/etc/caddy/Caddyfile
      - $PWD/web:/srv
      - $PWD/data:/data
      - $PWD/config:/config
#    network_mode: host
    networks:
      - default
      - proxy

networks:
  proxy:
    external: true

Caddyfile:

http://pihole.crackpi.lan {
  reverse_proxy localhost:1080
  encode zstd gzip
}

Local DNS Records at Pi-hole Web Interface:

pihole.crackpi.lan	10.0.1.1

What I have changed since installing Pi-hole:
Only docker-compose files written above.

Do you have any idea, what my mistake could be?

Thanks in adcance and kind regards,
Agrigor

Those entries define the upstream DNS servers that Pi-hole is going to forward allowed DNS requests to.
You should supply valid IP addresses here, and commonly, those would be public DNS server IPs.

And as you didn't supply any DNS entries via Docker arguments, possibly the container itself may also fail to resolve DNS.

You may want to have a read of Pi-hole's Quick Start information on Docker.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.