anudeepND / whitelist

A simple tool to add commonly white listed domains to your Pi-Hole setup.
MIT License
4.21k stars 281 forks source link

Docker installation (without Python3 support) - Instructions wrong #242

Open wassereimer86 opened 2 years ago

wassereimer86 commented 2 years ago

Hi there, the instructions say:

For Docker installation (without Python3 support) or /etc/pihole on different directory
You can pass two optional arguments to whitelist.py, uninstall.py, and referral.sh:

 -d or --dir to specify the Pi-hole etc directory (in normal install should be /etc/pihole)
 -D or --docker to specify if Pi-hole is running as Docker container
git clone https://github.com/anudeepND/whitelist.git
sudo python3 whitelist/scripts/whitelist.py --dir /home/docker/pihole/etc-pihole/ --docker

So i should run a python3 command in case i don't have python3? There is only one .sh file for the referral-sites. How do i install the whitelist?

mvarrieur commented 1 year ago

I know this is an old issue but I just ran into the same thing: the instructions could be more clear but this means you should run the script on the docker host machine, point --dir to the directory that is mapped as a volume to the pihole container, and all --docker does is restart a container named pihole after it's done manipulating the files.

asyba commented 1 year ago

+1 the instructions could be more clear

rafaelcapucho commented 1 year ago

yes, it is pretty hard to install.

root@PiHole:~# docker ps
CONTAINER ID   IMAGE                  COMMAND      CREATED        STATUS                 PORTS                                                                                                             NAMES
02dda16944b2   pihole/pihole:latest   "/s6-init"   17 hours ago   Up 9 hours (healthy)   0.0.0.0:53->53/tcp, :::53->53/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:53->53/udp, :::80->80/tcp, :::53->53/udp, 67/udp   pihole

when I run python3 whitelist/scripts/whitelist.py --docker I get [X] /etc/pihole was not found because of course, it only exists inside the VM, I could do a volume mapping myself but what is the point of the --docker flag if it doesn't automate the solution to the volume? hehehe

rafaelcapucho commented 1 year ago

Solved it with: python3 whitelist/scripts/whitelist.py --dir ~/etc-pihole/ --docker

I haven't notice that the pihole container from their docker-compose version already mapped the etc/pihole themselves. Thx