I'm trying to get Pi-hole to work with docker-compose, but the container is constantly restarting and gives the following error message
nameserver 127.0.0.11
options ndots:0
Assigning random password: B7VA2cGP
stty: 'standard input': Inappropriate ioctl for device
[i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u3
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
::: Pre existing WEBPASSWORD found
Using default DNS servers: 8.8.8.8 & 8.8.4.4
DNSMasq binding to default interface: eth0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
"ServerIP" => "0.0.0.0",
"VIRTUAL_HOST" => "0.0.0.0",
Using IPv4 and IPv6
::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
dnsmasq: bad option at line 1 of /etc/dnsmasq.d/localversions
::: Testing pihole-FTL DNS: [cont-init.d] 20-start.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
stty: 'standard input': Inappropriate ioctl for device
::: Starting docker specific checks & setup for docker pihole/pihole
WARNING Misconfigured DNS in /etc/resolv.conf: Two DNS servers are recommended, 127.0.0.1 and any backup server
WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11)
My docker-compose.yaml looks like this
version: "3.7"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "10.0.10.65:53:53/tcp"
- "10.0.10.65:53:53/udp"
- "10.0.10.65:80:80/tcp"
- "10.0.10.65:443:443/tcp"
environment:
TZ: 'Europe/Berlin'
# WEBPASSWORD: 'set a secure password here or it will be random'
volumes:
- 'pihole:/etc/pihole/'
- 'pihole:/etc/dnsmasq.d/'
dns:
- 127.0.0.1
- 1.1.1.1
networks:
- pihole
restart: unless-stopped
volumes:
pihole:
networks:
pihole:
external: true
What am I doing wrong? Any help would be appreciated.