1
0
mirror of https://github.com/pi-hole/docker-pi-hole.git synced 2024-06-23 16:06:41 +02:00
Go to file
2016-02-13 18:55:32 -06:00
AdminLTE@77b5a79a49 correct the submodule git type 2016-02-13 14:29:19 -06:00
alpine updating to the latest upstream pihole code 2016-02-13 16:11:04 -06:00
debian updating to the latest upstream pihole code 2016-02-13 16:11:04 -06:00
pi-hole@e37495d80b updating to the latest upstream pihole code 2016-02-13 16:11:04 -06:00
.gitignore alpine nginx pihole working, weighing in at 85.36 MB vs debian 252.4 MB 2016-02-13 13:24:44 -06:00
.gitmodules correct the submodule git type 2016-02-13 14:29:19 -06:00
alpine.docker updating to the latest upstream pihole code 2016-02-13 16:11:04 -06:00
debian.docker updating to the latest upstream pihole code 2016-02-13 16:11:04 -06:00
docker-compose.yml alpine nginx pihole working, weighing in at 85.36 MB vs debian 252.4 MB 2016-02-13 13:24:44 -06:00
Dockerfile alpine nginx pihole working, weighing in at 85.36 MB vs debian 252.4 MB 2016-02-13 13:24:44 -06:00
doco-alpine.yml alpine nginx pihole working, weighing in at 85.36 MB vs debian 252.4 MB 2016-02-13 13:24:44 -06:00
doco-debian.yml alpine nginx pihole working, weighing in at 85.36 MB vs debian 252.4 MB 2016-02-13 13:24:44 -06:00
doco-example.yml detailed readme 2016-02-13 18:29:55 -06:00
make_symlinks.sh alpine nginx pihole working, weighing in at 85.36 MB vs debian 252.4 MB 2016-02-13 13:24:44 -06:00
README.md fixing revered link markdown in readme 2016-02-13 18:55:32 -06:00
requirements.txt initial version of monolithic debian docker & WIP alpine. 2016-02-01 22:58:09 -06:00

A Docker project to make lightweight continers with pi-hole functionality.

Docker tags

Alpine

This is an optimized docker using (https://hub.docker.com/_/alpine/](alpine) as it's base

Debian

This version of the docker aims to be as close to a standard pi-hole installation by using the same base OS and the exact configs and scripts (minimally modified to get them working)

Basic Docker Usage

The minimum options required to run are: docker run -p 53:53/tcp -p 53:53/udp -p 8053:80 --cap-add=NET_ADMIN -d diginc/pi-hole dnsmasq requires NET_ADMIN capabilities to run correctly in docker. I'm arbitrarily choosing port 8053 for the web interface.

Here are some useful volume mounts options to persist your history of stats in the admin interface, or add custom whitelists/blacklists. Create these files on the docker host first or you'll get errors:

  • docker run -v /var/log/pihole.log:/var/log/pihole.log ... (plus all of the minimum options added)
  • docker run -v /etc/pihole/blacklist.txt:/etc/pihole/blacklist.txt ... (plus all of the minimum options added)
  • docker run -v /etc/pihole/whitelist.txt:/etc/pihole/whitelist.txt ... (plus all of the minimum options added)
  • if you use this you should probably read the Advanced Usage section

All of these options get really long when strung together in one command, which is why I'm not going to show all the full commands variations. This is where docker-compose yml files come in handy for representing really long docker commands in a readable file format.

Advanced Usage

The standard pi-hole customization abilities apply to this docker but with docker twists such as using docker volumes to map host stored file configurations over the container defaults. Volumes are also important to persist the configuration incase you have remove the pihole container which is a typical docker upgrade pattern.

Customizing with volume mounts

Here are some relevant wiki page from pi-hole's documentation and example volume mappings to add to your docker run command:

  • Customizing sources for ad lists
  • -v your-adlists.list:/etc/pihole/adlists.list Your version should probably start with the existing defaults for this file.
  • Whitlisting and Blacklisting
  • -v your-whitelist:/etc/pihole/whitelist.txt Your version should probably start with the existing defaults for this file.
  • -v your-blacklist:/etc/pihole/blacklist.txt This one is empty by default

Since the original scripts are in the container they should work via docker exec like so:

  • docker exec pihole_container_name whitelist.sh some-good-domain.com
  • docker exec pihole_container_name blacklist.sh some-bad-domain.com