Try using host dns from docker.
I want the pihole image to access the parent host's dns-over-https proxy, but ideally that proxy should only be exposed on 127.0.0.1. According to https://www.cloudsavvyit.com/14114/how-to-connect-to-localhost-within-a-docker-container/ I can alias the host in docker. Let's give it a shot.
This commit is contained in:
parent
35d172b279
commit
d27bb84cf0
@ -99,10 +99,11 @@ in {
|
||||
image = "pihole/pihole:2021.10";
|
||||
autoStart = true;
|
||||
ports = [ "5353:53/tcp" "5353:53/udp" "3080:80/tcp" ];
|
||||
extraOptions = [ "--add-host=host.docker.internal:host-dns" ];
|
||||
environment = {
|
||||
# ServerIP = primary-ip;
|
||||
VIRTUAL_HOST = "dns-hole.sea.fudo.org";
|
||||
DNS1 = "127.0.0.1#${toString dns-proxy-port}";
|
||||
DNS1 = "host-dns#${toString dns-proxy-port}";
|
||||
};
|
||||
volumes = [
|
||||
"/state/pihole/etc-pihole/:/etc/pihole/"
|
||||
|
Loading…
Reference in New Issue
Block a user