From e02f4bd837283c76e2d1d1c4240fdc978fa771e7 Mon Sep 17 00:00:00 2001 From: diginc Date: Tue, 26 Apr 2016 07:46:27 -0500 Subject: [PATCH] updated example environment variables and documentation I missed --- README.md | 6 +++--- docker_run.sh | 2 +- doco-alpine.yml | 2 +- doco-debian.yml | 2 +- doco-example.yml | 2 +- jwilder-proxy-example-doco.yml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7c51f59..5f9c1f3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A Docker project to make lightweight x86 continers with [pi-hole](https://pi-hol [![Build Status](https://travis-ci.org/diginc/docker-pi-hole.svg?branch=master)](https://travis-ci.org/diginc/docker-pi-hole) -*April 25, 2016 Update*: piholeIP env var replaced by ServerIP env var, update your docker run/docker-compose configs accordingly please. +**April 25, 2016 Update**: piholeIP env var replaced by ServerIP env var, update your docker run/docker-compose configs accordingly please. ## Basic Docker Usage @@ -12,10 +12,10 @@ To customize your upstream DNS servers you use docker environment varibales of * ``` 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 piholeIP="$IP" --name pihole -d diginc/pi-hole +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 ``` -* piholeIP environment variable is required or default pi-hole scripts autodetect and give ads the private docker ip address that is not on your network so won't work. +* ServerIP environment variable is required because default pi-hole scripts autodetect and give ads the private docker ip address that is not on your network so it just won't work. * A good way to test things are working right is by loading this page: [http://pi-hole.isworking.ok/admin/](http://pi-hole.isworking.ok/admin/) * [Here is an example of running with jwilder/proxy](https://github.com/diginc/docker-pi-hole/blob/master/jwilder-proxy-example-doco.yml) (an nginx auto-configuring docker reverse proxy for docker) on my port 80 with pihole on another porg. Pi-hole needs to be `DEFAULT_HOST` env in jwilder/proxy and you need to set the matching `VIRTUAL_HOST` for the pihole. Please read jwilder/proxy readme for more info if you have trouble. I tested this basic exmaple which is based off what I run. * If you have something else taking up port 80 then the ads may not transform into blank ads correctly. The solution to this is to make sure whatever you do have as the 'default' port 80 virtual host is redirect to this container. diff --git a/docker_run.sh b/docker_run.sh index 6add1e9..46f76f7 100755 --- a/docker_run.sh +++ b/docker_run.sh @@ -5,6 +5,6 @@ IP=$(ip addr show eth0 | 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 piholeIP="$IP" \ + -e ServerIP="$IP" \ --name pihole \ -d $image diff --git a/doco-alpine.yml b/doco-alpine.yml index 3984c81..3ede9a8 100644 --- a/doco-alpine.yml +++ b/doco-alpine.yml @@ -3,7 +3,7 @@ alpine: dockerfile: alpine.docker environment: # Your docker host IP is required if you run RUN (not build) - piholeIP: 192.168.1.55 + ServerIP: 192.168.1.55 ports: - "53:53/tcp" - "53:53/udp" diff --git a/doco-debian.yml b/doco-debian.yml index 82f9dc8..4258487 100644 --- a/doco-debian.yml +++ b/doco-debian.yml @@ -3,7 +3,7 @@ debian: dockerfile: debian.docker environment: # Your docker host IP is required if you run RUN (not build) - piholeIP: 192.168.1.55 + ServerIP: 192.168.1.55 ports: - "53:53/tcp" - "53:53/udp" diff --git a/doco-example.yml b/doco-example.yml index bf3ce06..c61691d 100644 --- a/doco-example.yml +++ b/doco-example.yml @@ -8,7 +8,7 @@ pihole: - NET_ADMIN environment: # enter your docker host IP here - piholeIP: + ServerIP: # jwilder/proxy envs, see readme for more info PROXY_LOCATION: pihole VIRTUAL_HOST: pihole.yourdomain.local diff --git a/jwilder-proxy-example-doco.yml b/jwilder-proxy-example-doco.yml index f9e5dc0..4448e1f 100644 --- a/jwilder-proxy-example-doco.yml +++ b/jwilder-proxy-example-doco.yml @@ -20,7 +20,7 @@ pihole: cap_add: - NET_ADMIN environment: - piholeIP: 192.168.41.55 + ServerIP: 192.168.41.55 PROXY_LOCATION: pihole VIRTUAL_HOST: pihole.yourDomain.lan VIRTUAL_PORT: 80