You are not setting any of the recommended environment variables!?
As it is, you are not setting any environment variables at all, so FTLCONF_LOCAL_IPV4
is missing, as is WEBPASSWORD
, and you also don't declare any volumes.
Without volumes to persist data, Docker will lose any changes if you remove and restart a container. For Pi-hole, that would mean it would lose its configuration and its query history, e.g. after a reboot.
I don't use docker run myself, but yours should probably be altered to look similar to:
docker run -d --name pi_hole -v ./etc-pihole:/etc/pihole -v ./etc-dnsmasq.d:/etc/dnsmasq.d -e TZ=Europe/Berlin -e WEBPASSWORD='set a secure password here or it will be random' -e FTLCONF_LOCAL_IPV4='192.168.178.242' --net docker_to_router --ip 192.168.178.242 --restart unless-stopped pihole/pihole
You may want to adjust the timezone (TZ) if you are not in Germany, which I assumed you are because of your screenshots in German).
As for my recommendation to not advertise a DNS server's IPv6 address at all:
Your screenshots show that your Fritzbox still does that
That shows still as ticked, contradicting:
Please repeat applying the steps from my previous post.
With regards to your macvlan network, you should be aware that Docker is IPv4 only by default. You'd have to explicitly enable Docker's IPv6 support (available only for Docker on Linux) for your Docker daemon as well as any of your containers that you'd want to use IPv6.
In your case, at least your Pi-hole container does not use IPv6, as your docker run command comfirms.
But note that with the recommended changes to your FritzBox router, clients would talk to Pi-hole via IPv4 exclusively, so your container would not require an IPv6 at all.
Consequently, you could remove all IPv6 related options from your docker network create
.
And one thing you also should be aware of:
Docker's macvlan isolation prevents direct communication between your Pi-hole container and the Docker host, i.e. your laptop hosting Docker cannot use your dockered Pi-hole on the same machine for DNS.
If it would do so, it may not be able to resolve DNS at all, as Docker would interdict communication with the Pi-hole container.
If you want your laptop to be filtered by Pi-hole as well, you should probably switch to bridge or host network modes.
In case you absolutely require macvlan, you'd have to create a shim network to route traffic between the container and the host.