Expected Behaviour:
[Docker host machine DNS lookups should be using the local PiHole server]
Actual Behaviour:
[Ping / nslookup doesn't work. Ping gives a DNS failure, and nslookup gives the message ";; reply from unexpected source: 127.0.0.1#53, expected 127.0.0.53#53". If I change /etc/resolv.conf from "nameserver 127.0.0.53
" to "nameserver 127.0.0.1" then it all functions correctly. However this file appears to be overwritten on startup / regularly so this is not a good permanent solution.]
Hi, I have installed pihold in a docker container, and it seems to be working for all of my other PCs on the network which is great. However I have changed the DNS server distributed by the DHCP server (my router), and now the docker PC is unable to correctly resolve domain names unless I manually modify /etc/resolv.conf. I have tried searching and trying solutions from across the net, but I can't seem to get it running correctly. The docker image is running on Ubuntu Server 17.10, and this PC is pretty much only running docker images.
Just figured I would see if anyone had any ideas that may be helpful.I know this isn't strictly related to pihole, but hopes someone may be able to point me in the right direction.
Cheers
Here is the docker configuration I am using ![]()
pihole:
command:
- ""
container_name: pihole
entrypoint:
- /init
environment:
- ServerIP=10.1.1.25
- ServerIPv6=10.1.1.25
- PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- TAG=alpine
- ARCH=amd64
- setupVars=/etc/pihole/setupVars.conf
- PIHOLE_INSTALL=/tmp/ph_install.sh
- S6OVERLAY_RELEASE=https://github.com/just-containers/s6-overlay/releases/download/v1.20.0.0/s6-overlay-amd64.tar.gz
- WEBLOGDIR=/var/log/nginx
- PHP_CONFIG=/etc/php5/php-fpm.conf
- PHP_ENV_CONFIG=/etc/php5/fpm.d/envs.conf
- PHP_ERROR_LOG=/var/log/nginx/error.log
- IPv6=True
- S6_LOGGING=0
- S6_KEEP_ENV=1
- S6_BEHAVIOUR_IF_STAGE2_FAILS=2
- WEBPASSWORD=lifefm
hostname: xxxxxxxx
image: diginc/pi-hole:alpine
ipc: shareable
labels:
image: diginc/pi-hole:alpine_amd64
maintainer: adam@diginc.us
url: https://www.github.com/diginc/docker-pi-hole
log_driver: json-file
mac_address: 02:42:ac:11:00:04
net: bridge
ports:
- 53:53/tcp
- 80:80/tcp
- 53:53/udp
restart: always
volumes:
- /docker/pihole/dnsmasq.d:/etc/dnsmasq.d
- /docker/pihole/config:/etc/pihole