Git Product home page Git Product logo

dockerpihole's Introduction

Docker Pi-Hole

A Docker container built on Debian to run pi-hole ad filter

GitHub repository: https://github.com/lp-lab/dockerPiHole

Issues reports: https://github.com/lp-lab/dockerPiHole/issues

Environment variables

This container accepts a number of variables passed by Docker command line via -e switch

Variable Default value Description
ServerIP NONE - REQUIRED The IP address of the pi-hole container
ADMIN_PASS NONE - REQUIRED The admin password for the pi-hole web interface
DNS1 8.8.8.8 - Google Primary DNS
DNS2 8.8.4.4 - Google Secondary DNS

docker run -p 53:53 -p 53:53/udp -p 80:80 -d --name pihole -e ADMIN_PASS="reallysecurepassword" -e DNS1="10.0.0.1" -e DNS2="10.0.0.2" -e ServerIP="10.0.0.3" lplab/pihole:latest

Running Docker Pi-Hole

The bare minimum to run this container is:

docker run -p 53:53 -p 53:53/udp -p 80:80 -d --name pihole -e ADMIN_PASS="reallysecurepassword" -e ServerIP="IP.ADDRESS.OF.CONTAINER" lplab/pihole:latest

it will start the container and automatically update the blocked domain list.

Volume mounts

Starting with version 2.0.2, even /var/log is automatically binded to a docker volume, so there's no need to mount it from command line

Starting with version 2.0.0 of this container, released on June 16th 2017, pihole-FTL uses a sqlite DB to store queries, located on /etc/pihole directory, so the container now automatically creates a volume to store this directory, there's no need to mount any file in /etc/pihole and can be safely removed from the command line

There are some useful volume mounts, passed via -v switch to the Docker command line:

  • -v /etc/localtime:/etc/localtime:ro
  • -v /etc/timezone:/etc/timezone:ro

to allow the container to use your system timezone, for query graph renders.

  • -v /srv/pihole/etc/hosts:/etc/hosts

for manual adding of certain hostname.

Always remember to mkdir/touch directory and files before the container startup or Docker will create directory for every mount.

Upgrades

To upgrade download the new version from Docker's hub

docker pull lplab/pihole:latest

then stop the running container

docker rm -f pihole

and restart the new pihole using the same command line as above.

dockerpihole's People

Contributors

cloudlyfe-aldwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dockerpihole's Issues

Webpage just a logo

I only see the pihole logo, I thought there would be some statistics or something. I'm using the latest Chrome Web Browser.

Disregard

Format error

I'm trying running lp-lab/dockerPiHole on raspberry ARMv7 Processor rev 4 (v7l)
Docker version: Docker version 18.06.0-ce, build 0ffa825

After pull the container on docker hub and start like

$docker run -p 53:53/tcp -p 53:53/udp -p 80:80/tcp -d -e DNS1="8.8.8.8" -e DNS2="8.8.4.4" lplab/pihole

I've got this error:
$docker logs a257dfcdf36d
standard_init_linux.go:190: exec user process caused "exec format error"

Not accepting HTTP connections

I ran with the following:
sudo docker run --name pihole -e ADMIN_PASS="reallysecurepassword" -e ServerIP="192.168.1.20" lplab/pihole:latest

Neither the webserver or the DNS server is accepting connections (connection refused, even from the host system). If I use docker exec and run bash in the container I can do curl and nslookup on localhost and it does answer. Is there something I need to do to get the server to accept outside connections? The IP I'm using in ServerIP is the IP of the machine running docker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.