I am very much a docker novice. Very. Here goes …
Running Version 18.03.0-ce-mac60 (23751) on MacOS High Sierra (10.13.3). My aim is to run the container diginc/pi-hole. From a fresh and empty docker installation, I did this:
$ docker pull diginc/pi-hole
Using default tag: latest
latest: Pulling from diginc/pi-hole
3e731ddb7fc9: Pull complete
ef1a317cbe8f: Pull complete
12d29ba177e3: Pull complete
99d41519d4fd: Pull complete
e81703634e29: Pull complete
58fdcc9fd523: Pull complete
a47a485afd6c: Pull complete
Digest: sha256:f701d2bfd6bd31cc959c6110b318cb07c686e56b557005aa6ac86eb6aef6b6c3
Status: Downloaded newer image for diginc/pi-hole:latest
Next I adapted the script ‘run.sh’ by avoiding trying to use the nonexistent utility ‘ip’ and wiring in my chosen IP address. Here’s what happens:
$ bash run.sh
IP: 10.0.101.66 - IPv6:
e6911c8d0c2380d3aa13cec3af98cfa74bfdecea37d4288f00d38c5e28d13630
docker: Error response from daemon: driver failed programming external connectivity on endpoint pihole (00d38ac72e3626b53916e4aa384a91164b1c84c684ae40dd17d2f4a185d11acf): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE).
At this point I’m stuck. Does anyone have a suggestion on how to proceed? Thanks.
Did I mention I’m a complete novice?
Here is my version of run.sh:
$ cat run.sh
#!/bin/bash
IP=10.0.101.66
IPv6=
IP_LOOKUP=
IPv6_LOOKUP=
IP="${IP:-$IP_LOOKUP}" # use $IP, if set, otherwise IP_LOOKUP
IPv6="${IPv6:-$IPv6_LOOKUP}" # use $IPv6, if set, otherwise IP_LOOKUP
DOCKER_CONFIGS="$(pwd)" # Default of directory you run this from, update to where ever.
echo “IP: ${IP} - IPv6: ${IPv6}”
docker run -d
–name pihole
-p 53:53/tcp -p 53:53/udp -p 80:80
-v “${DOCKER_CONFIGS}/pihole/:/etc/pihole/”
-v “${DOCKER_CONFIGS}/dnsmasq.d/:/etc/dnsmasq.d/”
-e ServerIP="${IP}"
-e ServerIPv6="${IPv6}"
–restart=always
diginc/pi-hole:latest
docker logs pihole 2> /dev/null | grep ‘password:’