Docker Pi-hole : adding extra domains to gravity

The issue I am facing:
Prior to today I have been using Pi-hole via installation on a Raspberry Pi 2 (as per instructions here: https://www.smarthomebeginner.com/pi-hole-setup-guide/).
Then today I have decided to try to get Pi-hole to work on my Raspberry Pi 2 via Docker-compose instead. I have got it to work.
I am now trying to expand the list of banned domains. When I was using a normal installation (instead of Docker/Docker-compose), I could install this: GitHub - jessedp/pihole5-list-tool: A tool for quickly and easily bulk adding allow and ad/block lists to a Pi-hole 5 installation), and then set a cron job to update gravity every night at 4am.
However I can't install pihole5-list-tool in the Docker pihole image because there doesn't seem to be Python or pip3 installed. Could you please advise how I would go about doing it?

Details about my system:
Raspberry Pi 2 running Raspbian OS 32bit (latest as of 2021-04-26, which is 2021-03-04-raspios-buster-armhf).

What I have changed since installing Pi-hole:
I do not know how to install and run pihole5-list-tool when Pi-hole is running in a Dockerised container image.

Any help most gratefully received! Please note I am fairly new to Docker. Thank you.

Pi-hole's Docker image is meant to be run as is.

If you want to extend your container, you'd have to build your own Docker image or find a third-party supplier that matches your individual needs.
In your case, that would probably suggest that you'd check with the maintainer of the tools you want to use whether they would offer such an image.
Note that support for that image would be entirely third-party as well.

Alternatively, you could also consider to use the standard Pi-hole Docker image as is.
The tool you mention does little more than adding a few blocklists from firebog.net.
This is a task you'd have to do yourself just once.
And by default, Pi-hole already updates all configured adlists automatically every Sunday.

Hi, thank you very much for your explanations.
I have a few questions in light of what you've written, which I hope you don't mind me asking.

  1. with respect to your first paragraph, I think the maintainer of the tools has made it easy, with something I missed. In the github page it says:
    "Docker" - if you're running the pihole docker image (or one named pihole ), it should be detected and offered as a default option".
    So I think this means I can install it on the host and it should add the information in automatically for me.

This is a guess though because I'm unable to do it, because I don't seem to have DNS resolution on my Raspbian host. I am unable to ping www.google.com. Is there a setting in a conf document in /etc/dnsmasq.d/, or some text that I should add, which would allow the host OS to be able to ping a website? And hence get updates etc if run (eg sudo apt update etc...)?

Maybe I am missing something in 01-pihole.conf?

  1. with regards to your second paragraph, is it possible or even sensible, to copy the entries in /etc/pihole/ in my previous instance of Pi-hole into the corresponding instance in my new Dockerised version of Pi-hole? Would that copy all my entries from firebog into my new instance that one time?
    (I have mapped /etc/pihole/ in the host OS to the /etc/pihole/ in the volume of Dockerised Pi-hole)

Thanks again for your help!

ad 1.

I cannot know that, as that would be a question for the third-party.

ad 2.

You should be able to use Backup from Pi-hole's Teleporter on your existing installation and then use Restore from your dockered Pi-hole's UI.

ad 1.
I can confirm that if you run the command:

sudo pip3 install pihole5-list-tool --upgrade

then the utility will install fine and detect the Dockerised Pi-hole, and work with it. That is the first issue resolved. The answer is you do not have to enter into the Pi-hole container to install it.

ad2.
Thank you, I had forgotten about the Teleporter functionality. And I did not know you could "transplant' settings from one Pi-hole to another like that, but that makes sense.

BUT
My question now is:
on a clean install of Raspbian, using only Docker Pi-hole, should the Raspbian OS be able to ping www.google.com?
That's to ask:
Pi-hole is a DNS (as well as DHCP) server, but where does it itself get it's DNS settings from (as in the base OS)?
Do I manually have to

sudo nano /etc/dhcpcd.conf

and set a static IP, router/gateway and static DNS entries (like 1.1.1.1 and 1.0.0.1) first?

Pi-holes DNS operation isn't affected by OS level settings:
It will always forward DNS to one of its configured upstream DNS servers.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.