This docker-compose seems to complicated IMO. While this may work you should mind that Pi-hole also accepts hostnames (not only IP addresses) as upstream servers. You can omit the entire IP address definition and the complicated network configuration and simply specify unbound as the DNS server using the pihole container's environment.
services:
pihole:
container_name: pihole
image: pihole/pihole:development-v6
networks:
- pihole-unbound
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
- "443:443/tcp"
environment:
TZ: 'America/Chicago'
# Set a password to access the web interface. Not setting one will result in a random password being assigned
FTLCONF_webserver_api_password: 'correct horse battery staple'
# Configure DNS upstream servers, e.g:
FTLCONF_dns_upstreams: 'unbound'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
restart: unless-stopped
unbound:
image: mvance/unbound:latest
networks:
- pihole-unbound
restart: unless-stopped
networks:
pihole-unbound:
WARNING WARNING in dnsmasq core: no address range available for DHCP request via eth0
My compose file:
services:
pihole:
container_name: pihole
image: pihole/pihole:development-v6
networks:
- pihole-unbound
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
- "443:443/tcp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
environment:
TZ: 'Europe/Berlin'
# Set a password to access the web interface. Not setting one will result in a random password being assigned
FTLCONF_webserver_api_password: 'MyWebServerApiPassword'
# Configure DNS upstream servers, e.g:
FTLCONF_dns_upstreams: 'unbound'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
restart: unless-stopped
labels:
- com.centurylinklabs.watchtower.enable=true
cap_add:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
unbound:
image: mvance/unbound:latest
container_name: unbound
networks:
- pihole-unbound
restart: unless-stopped
labels:
- com.centurylinklabs.watchtower.enable=true
networks:
pihole-unbound:
name: pihole-unbound