added ARM tag to docs, update to readme and run script
This commit is contained in:
parent
2c704addaf
commit
db5b1c72eb
39
README.md
39
README.md
|
@ -1,26 +1,29 @@
|
|||
A [Docker](https://www.docker.com/what-docker) project to make lightweight x86 continers with [pi-hole](https://pi-hole.net) functionality. Why? Maybe you don't have a Raspberry Pi lying around but you do have a Docker server.
|
||||
A [Docker](https://www.docker.com/what-docker) project to make lightweight x86 and ARM continer with [pi-hole](https://pi-hole.net) functionality. Why? Maybe you don't have a Raspberry Pi lying around but you do have a Docker server.
|
||||
|
||||
[![Build Status](https://travis-ci.org/diginc/docker-pi-hole.svg?branch=master)](https://travis-ci.org/diginc/docker-pi-hole)
|
||||
[![Docker Stars](https://img.shields.io/docker/stars/diginc/pi-hole.svg?maxAge=2592000)](https://hub.docker.com/r/diginc/pi-hole/)
|
||||
[![Docker Pulls](https://img.shields.io/docker/pulls/diginc/pi-hole.svg?maxAge=2592000)](https://hub.docker.com/r/diginc/pi-hole/)
|
||||
Now with ARM support! Just install docker on your Rasberry-Pi (the current install is simply `curl -sSL https://get.docker.com | sh`[[1](https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/)] and run docker image `diginc/pi-hole:arm tag` (see below for full required command).
|
||||
|
||||
[![Build Status](https://travis-ci.org/diginc/docker-pi-hole.svg?branch=master)](https://travis-ci.org/diginc/docker-pi-hole) [![Docker Stars](https://img.shields.io/docker/stars/diginc/pi-hole.svg?maxAge=2592000)](https://hub.docker.com/r/diginc/pi-hole/) [![Docker Pulls](https://img.shields.io/docker/pulls/diginc/pi-hole.svg?maxAge=2592000)](https://hub.docker.com/r/diginc/pi-hole/)
|
||||
|
||||
[![Join the chat at https://gitter.im/diginc/docker-pi-hole](https://badges.gitter.im/diginc/docker-pi-hole.svg)](https://gitter.im/diginc/docker-pi-hole?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
**April 25, 2016 Update**: the 'piholeIP' env var has been replaced by 'ServerIP' env var, update your docker run/docker-compose configs accordingly please.
|
||||
|
||||
## Running Pi-Hole Docker
|
||||
|
||||
[Dockerhub](https://hub.docker.com/r/diginc/pi-hole/) automatically builds the latest docker-pi-hole changes into images which can easily be pulled and ran with a simple `docker run` command.
|
||||
[Dockerhub](https://hub.docker.com/r/diginc/pi-hole/) automatically builds the latest docker-pi-hole changes into images which can easily be pulled and ran with a simple `docker run` command.
|
||||
|
||||
One crucial thing to know before starting is docker-pi-hole container needs port 53 and port 80, 2 very popular ports that may conflict with existing applications. If you have no other services or dockers using port 53/80 (if you do, keep reading below for a reverse proxy example), the minimum options required to run this container are in the script [docker_run.sh](https://github.com/diginc/docker-pi-hole/blob/master/docker_run.sh) or summarized here:
|
||||
One crucial thing to know before starting is the docker-pi-hole container needs port 53 and port 80, 2 very popular ports that may conflict with existing applications. If you have no other services or dockers using port 53/80 (if you do, keep reading below for a reverse proxy example), the minimum options required to run this container are in the script [docker_run.sh](https://github.com/diginc/docker-pi-hole/blob/master/docker_run.sh) or summarized here:
|
||||
|
||||
```
|
||||
IP=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
|
||||
docker run -p 53:53/tcp -p 53:53/udp -p 80:80 --cap-add=NET_ADMIN -e ServerIP="$IP" --name pihole -d diginc/pi-hole
|
||||
IMAGE='diginc/pi-hole'
|
||||
NIC='eth0'
|
||||
IP=$(ip addr show $NIC | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
|
||||
docker run -p 53:53/tcp -p 53:53/udp -p 80:80 --cap-add=NET_ADMIN -e ServerIP="$IP" --name pihole -d $IMAGE
|
||||
|
||||
# Recommended auto ad list updates & log rotation:
|
||||
wget -O- https://raw.githubusercontent.com/diginc/docker-pi-hole/master/docker-pi-hole.cron | sudo tee /etc/cron.d/docker-pi-hole.cron
|
||||
```
|
||||
|
||||
This is just an example and might need changing. For exmaple of you're running on a raspberry pi over wireless you'll probably want to change your NIC variable to `wlan0` and IMAGE to `diginc/pi-hole:arm`
|
||||
|
||||
**Automatic Ad List Updates** - [docker-pi-hole.cron](https://github.com/diginc/docker-pi-hole/blob/master/docker-pi-hole.cron) is a modified verion of upstream pi-hole's crontab entries using `docker exec` to run the same update scripts inside the docker container. The cron automatically updates pi-hole ad lists and cleans up pi-hole logs nightly. If you're not using the `docker run` with `--name pihole` from default contariner run command be sure to fill in your container's DOCKER_NAME into the variable in the cron file.
|
||||
|
||||
**Tips**
|
||||
|
@ -45,7 +48,13 @@ All of these options get really long when strung together in one command, which
|
|||
|
||||
## Docker tags
|
||||
|
||||
### Alpine
|
||||
| tag | architecture | description |
|
||||
| ------ | ------------ | ----------- |
|
||||
| alpine | x86 | Alpine x86 image, small size container running nginx and dnsmasq |
|
||||
| debian | x86 | Debian x86 image, container running lighttpd and dnsmasq |
|
||||
| arm | ARM | Debian ARM image, container running lighttpd and dnsmasq built for ARM |
|
||||
|
||||
### `diginc/pi-hole:alpine`
|
||||
|
||||
[![](https://images.microbadger.com/badges/image/diginc/pi-hole.svg)](http://microbadger.com/images/diginc/pi-hole "Get your own image badge on microbadger.com")
|
||||
[![](https://images.microbadger.com/badges/version/diginc/pi-hole.svg)](http://microbadger.com/images/diginc/pi-hole "Get your own version badge on microbadger.com")
|
||||
|
@ -53,7 +62,8 @@ All of these options get really long when strung together in one command, which
|
|||
|
||||
This is an optimized docker using [alpine](https://hub.docker.com/_/alpine/) as its base. It uses nginx instead of lighttpd.
|
||||
|
||||
### Debian
|
||||
|
||||
### `diginc/pi-hole:debian`
|
||||
|
||||
[![](https://images.microbadger.com/badges/image/diginc/pi-hole:debian.svg)](http://microbadger.com/images/diginc/pi-hole "Get your own image badge on microbadger.com")
|
||||
[![](https://images.microbadger.com/badges/version/diginc/pi-hole:debian.svg)](http://microbadger.com/images/diginc/pi-hole "Get your own version badge on microbadger.com")
|
||||
|
@ -61,6 +71,11 @@ This is an optimized docker using [alpine](https://hub.docker.com/_/alpine/) as
|
|||
|
||||
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). This serves as a nice baseline for merging and testing upstream repository pi-hole changes.
|
||||
|
||||
### `diginc/pi-hole:arm` (Debian)
|
||||
|
||||
As close to the debian image as possible, but cross compiled for ARM architecture hardware through [resin.io's awesome Qemu wrapper](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/).
|
||||
|
||||
Alpine doesn't have an arm cross compileable image at this time.
|
||||
|
||||
## Persistence and Customizations
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#!/bin/bash
|
||||
image=${1:-'diginc/pi-hole:alpine'}
|
||||
IP=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
|
||||
IMAGE=${1:-'diginc/pi-hole:alpine'}
|
||||
NIC=${2:-'eth0'}
|
||||
IP=$(ip addr show $NIC | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
|
||||
|
||||
# Default ports + daemonized docker container
|
||||
docker run -p 53:53/tcp -p 53:53/udp -p 80:80 \
|
||||
--cap-add=NET_ADMIN \
|
||||
-e ServerIP="$IP" \
|
||||
--name pihole \
|
||||
-d $image
|
||||
-d $IMAGE
|
||||
|
|
Loading…
Reference in New Issue