Hi everyone, I see a lot of different solutions around the forum but I can't make none of them workig in my setup. So this is my docker-compose setup:
networks:
dns_net:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
pihole:
container_name: pihole
hostname: pihole
image: pihole/pihole:latest
networks:
dns_net:
ipv4_address: 172.20.0.6
ports:
- "192.168.30.11:53:53/tcp"
- "192.168.30.11:53:53/udp"
# we can't just do '53:53/tcp' and '53:53/udp' because of libvirt's dnsmasq
- "8017:80/tcp"
- "4439:443/tcp"
environment:
- 'TZ=Europe/Amsterdam'
- 'WEBPASSWORD=password'
- 'DNS1=172.20.0.7#5053'
- 'DNS2=no'
- 'ServerIP=192.168.30.11'
volumes:
- '/opt/pihole/etc-pihole/:/etc/pihole/'
- '/opt/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
restart: unless-stopped
cap_add:
- NET_ADMIN
unbound:
container_name: unbound
image: mvance/unbound:latest
networks:
dns_net:
ipv4_address: 172.20.0.7
volumes:
- /opt/unbound/:/opt/unbound/etc/unbound/
ports:
- "5053:5053/tcp"
- "5053:5053/udp"
healthcheck:
disable: true
restart: unless-stopped
PS: I know I'm missing there the "services:" tag because this is inside other containers setup, ignore that.
When I try to compile this I'm getting the error: Error response from daemon: Invalid address 172.20.0.7: It does not belong to any of this network's subnets
Help? Please?