Creating a custom container is the proper way to go today, much lighter on resources and a lot easier to customize/maintain version wise.
load safe sites into pihole's whitelist db in bulk form
How do you plan to use Python
inside the container, because it is not installed by default, you want to create instead a custom container? The maintainers only
use Python for tests. Instead of worrying about Python3, just insert your domains into
/etc/pihole/whitelist.txt
and restart the pihole-FTL service. Or run a command like
pihole -w somedomain.com
.
But you should not, Pihole is already taking care of official blacklist/whitelist database with Gravity. The additional blacklist/whitelist command is available for really specific cases only.
You should not run Pihole as Scale container. Instead, purchase two Raspberry Pi and install the
DietPi distro on them, which allows you to easily run Pihole+Unbound with a proper DNS setup. Imagine Scale down, your entire network is affected. This way, you isolate the DNS related issues and also have proper redundancy.
Then, you can install
@truecharts Homer app and have the two Pihole instances linked:
I'm adding this here because Homer lacks the documentation to address the
issue I reported to developer related to missing
CORS_HOSTS
environment variable in DietPi (replace
homer.lan
with whatever domain you want to use, I use a LetsEncrypt SSL enabled domain, so I access it everywhere in the world):
Code:
lighttpd-enable-mod setenv
cat >> /etc/lighttpd/conf-enabled/05-setenv.conf << 'EOF'
setenv.add-environment = (
"CORS_HOSTS" => "homer.lan"
)
EOF
systemctl restart lighttpd
Also, DietPi is based on Debian Bullseye 11 (like Scale) with Python3 as default, if you really want to run that whitelist Python script:
Code:
$ python3 --version
Python 3.9.2
$ ls -lah /usr/bin/python*
lrwxrwxrwx 1 root root 9 Apr 5 2021 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 5.1M Feb 28 2021 /usr/bin/python3.9
Scale has both versions of Python installed:
Code:
$ python2 --version
Python 2.7.18
$ python3 --version
Python 3.9.2
$ ls -lah /usr/bin/python*
lrwxrwxrwx 1 root root 7 Mar 2 2021 /usr/bin/python -> python3
lrwxrwxrwx 1 root root 9 Jul 28 2021 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3.5M Jul 14 2021 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 Apr 5 2021 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 960 Dec 23 2020 /usr/bin/python3-futurize
-rwxr-xr-x 1 root root 964 Dec 23 2020 /usr/bin/python3-pasteurize
-rwxr-xr-x 1 root root 1.8K Aug 6 2019 /usr/bin/python3-unidiff
-rwxr-xr-x 1 root root 6.3K Jul 27 2020 /usr/bin/python3-wsdump
-rwxr-xr-x 1 root root 5.3M Feb 28 2021 /usr/bin/python3.9