Compare commits

..

27 commits

Author SHA1 Message Date
Chris Crowe
33cebb3cfe
Upgrading base container to 2023.05.2 (#213) 2023-07-02 11:56:44 -07:00
Chris Crowe
55c88afaf8
Updating base container to 2023.02.2 (#202) 2023-03-22 08:26:30 -07:00
Chris Crowe
96038ebbfa
Upgrading base container to 2022.12 (#190) 2022-12-29 19:04:19 -08:00
Chris Crowe
226fddf83a
Upgrading base container to 2022.11.2 (#186) 2022-12-16 14:25:22 -08:00
Chris Crowe
025a0a20c3
Upgrading base container to 2022.11.1 (#181) 2022-11-24 11:50:15 -08:00
Mats Oftedal
e936dbb95c
Updated pihole container version to 2022.10 (#173)
Updated pihole container version to 2022.10
2022-10-12 22:04:55 -07:00
Xabi
d60ebfcd7d
Disable so-rcvbuf custom value (#166)
* Disable so-rcvbuf custom value

Using the default value is most of the time enough for a normal operation.

This removes an Unbound warning that complains about not having the requested 1m or more for kernel buffering.

* Corrected indentation

* Include additional information

Explained how to correctly enable so-rcvbuf.

Co-authored-by: burnbabyburn <xyz258@abwesend.de>

Co-authored-by: burnbabyburn <xyz258@abwesend.de>
2022-10-12 22:02:36 -07:00
Chris Crowe
ecee22c5f9
Updating base container to verison 2022.09.3 (#165) 2022-09-14 23:43:34 -07:00
MaHl111
2dd3f775c6
Update building and base container to 2022.09.2 (#161) 2022-09-14 23:22:37 -07:00
ChevySSinSD
77c9778f61
Replace FTLCONF_REPLY_ADDR4 with FTLCONF_LOCAL_IPV4 (#153) 2022-09-14 23:21:25 -07:00
Chris Crowe
8c1172acbc
Upgrading base container to 2022.08.2 (#151)
Required some reconfiguring since s6-overlay was upgraded to v3
2022-08-25 22:49:18 -07:00
Chris Crowe
0e8351772a
Update base container to 2022.07.1 (#143) 2022-07-10 16:24:13 -07:00
Chris Crowe
068d970f9e
Update base container to 2022.07 (#142) 2022-07-10 16:20:14 -07:00
Chris Crowe
45a04753ff
Update base container to 2022.05 (#134) 2022-05-26 23:10:12 -07:00
Xabi
9c405c39e4
Update pi-hole to version 2022.04.3 (#125) 2022-04-23 12:43:03 -07:00
Adam Warner
84741c9c1f
Missing = in PIHOLE_DNS_ Env var declaration (#121) 2022-04-13 21:42:34 -07:00
Jens Brey
0206d8049a
Migrated unbound process handling to s6 and updated to latest pihole (#119)
* one-container: Migrated unbound to s6 supervise, update to latest pihole base image

* Added unbound-run file for S6
2022-04-13 21:35:22 -07:00
Chris Crowe
d7741de332
Changing to compose file version 3.0
Should fix the issue seen here: https://github.com/chriscrowe/docker-pihole-unbound/issues/112
2022-03-13 20:43:56 -07:00
Chris Crowe
d378aa3efb
Update README.md
Typo
2022-03-11 18:09:54 -08:00
Chris Crowe
0a0b7ceb0c
Update README.md 2022-03-11 18:09:21 -08:00
Chris Crowe
0814098044
Adding default values for some Pi-Hole variables (#111) 2022-03-11 09:17:03 -08:00
ChevySSinSD
0c87b090e1
fix: ServerIP env variable deprecated, and other docker-compose.yaml updates (#109)
* updates to docker-compose.yaml and readme

* fixed typos

* final readme updates

* typo

* readme order

Co-authored-by: SSinSD <47265616+SSinSD@users.noreply.github.com>
2022-03-11 08:57:36 -08:00
Chris Crowe
5969c76ee1
2022.02.1 (#101)
Update base container to 2022.02.1
2022-02-13 08:55:58 -08:00
Greg Ramsaran
5292809c0a
formatting updates to environment syntax (#86)
environment variable should be = not .
Also updated PIHOLE_DNS_ from DNS1
2022-02-13 08:31:41 -08:00
LawnMo
adabe4c786
reduce edns-buffer-size to 1232 (#99)
avoids warnings in pihole such as :
Warning in dnsmasq core: reducing DNS packet size for nameserver 127.0.0.1 to 1280
from pihole's doc : https://docs.pi-hole.net/guides/dns/unbound/
2022-02-13 08:28:14 -08:00
Chris Crowe
5d990c297b
Upgrading base container to 2022.01.1 (#93) 2022-01-07 18:53:23 -08:00
Chris Crowe
8cb2c34de4
Upgrading base container to 2021.12 (#92)
* Upgrading base container to 2021.12

* Bumping to 2021.12.1
2021-12-26 14:09:08 -08:00
10 changed files with 77 additions and 46 deletions

View file

@ -10,25 +10,25 @@ The base image for the container is the [official Pi-Hole container](https://hub
First create a `.env` file to substitute variables for your deployment. First create a `.env` file to substitute variables for your deployment.
### Pi-hole environment variables
### Required environment variables > Vars and descriptions replicated from the [official pihole container](https://github.com/pi-hole/docker-pi-hole/#environment-variables):
> Vars and descriptions replicated from the [official pihole container](https://github.com/pi-hole/docker-pi-hole/): | Variable | Default | Value | Description |
| -------- | ------- | ----- | ---------- |
| Docker Environment Var | Description| | `TZ` | UTC | `<Timezone>` | Set your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to make sure logs rotate at local midnight instead of at UTC midnight.
| --- | --- | | `WEBPASSWORD` | random | `<Admin password>` | http://pi.hole/admin password. Run `docker logs pihole \| grep random` to find your random pass.
| `ServerIP: <Host's IP>`<br/> | **--net=host mode requires** Set to your server's LAN IP, used by web block modes and lighttpd bind address | `FTLCONF_LOCAL_IPV4` | unset | `<Host's IP>` | Set to your server's LAN IP, used by web block modes and lighttpd bind address.
| `TZ: <Timezone>`<br/> | Set your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to make sure logs rotate at local midnight instead of at UTC midnight. | `REV_SERVER` | `false` | `<"true"\|"false">` | Enable DNS conditional forwarding for device name resolution |
| `WEBPASSWORD: <Admin password>`<br/> | http://pi.hole/admin password. Run `docker logs pihole \| grep random` to find your random pass. | `REV_SERVER_DOMAIN` | unset | Network Domain | If conditional forwarding is enabled, set the domain of the local network router |
| `REV_SERVER: <"true"\|"false">`<br/> | Enable DNS conditional forwarding for device name resolution | `REV_SERVER_TARGET` | unset | Router's IP | If conditional forwarding is enabled, set the IP of the local network router |
| `REV_SERVER_DOMAIN: <Network Domain>`<br/> | If conditional forwarding is enabled, set the domain of the local network router | `REV_SERVER_CIDR` | unset | Reverse DNS | If conditional forwarding is enabled, set the reverse DNS zone (e.g. `192.168.0.0/24`) |
| `REV_SERVER_TARGET: <Router's IP>`<br/> | If conditional forwarding is enabled, set the IP of the local network router | `WEBTHEME` | `default-light` | `<"default-dark"\|"default-darker"\|"default-light"\|"default-auto"\|"lcars">`| User interface theme to use.
| `REV_SERVER_CIDR: <Reverse DNS>`<br/>| If conditional forwarding is enabled, set the reverse DNS zone (e.g. `192.168.0.0/24`)
Example `.env` file in the same directory as your `docker-compose.yaml` file: Example `.env` file in the same directory as your `docker-compose.yaml` file:
``` ```
ServerIP=192.168.1.10 FTLCONF_LOCAL_IPV4=192.168.1.10
TZ=America/Los_Angeles TZ=America/Los_Angeles
WEBPASSWORD=QWERTY123456asdfASDF WEBPASSWORD=QWERTY123456asdfASDF
REV_SERVER=true REV_SERVER=true
@ -37,10 +37,14 @@ REV_SERVER_TARGET=192.168.1.1
REV_SERVER_CIDR=192.168.0.0/16 REV_SERVER_CIDR=192.168.0.0/16
HOSTNAME=pihole HOSTNAME=pihole
DOMAIN_NAME=pihole.local DOMAIN_NAME=pihole.local
PIHOLE_WEBPORT=80
WEBTHEME=default-light
``` ```
### Using Portainer stacks? ### Using Portainer stacks?
> 2022-3-11: I'm being told that the advice below is no longer true in Portainer. If you're using Portainer, first try it without removing the volumes declaration and see if it works.
Portainer stacks are a little weird and don't want you to declare your named volumes, so remove this block from the top of the `docker-compose.yaml` file before copy/pasting into Portainer's stack editor: Portainer stacks are a little weird and don't want you to declare your named volumes, so remove this block from the top of the `docker-compose.yaml` file before copy/pasting into Portainer's stack editor:
```yaml ```yaml

View file

@ -1,4 +1,4 @@
version: '2' version: '3.0'
volumes: volumes:
etc_pihole-unbound: etc_pihole-unbound:
@ -14,22 +14,22 @@ services:
- 443:443/tcp - 443:443/tcp
- 53:53/tcp - 53:53/tcp
- 53:53/udp - 53:53/udp
- 80:80/tcp - ${PIHOLE_WEBPORT:-80}:80/tcp #Allows use of different port to access pihole web interface when other docker containers use port 80
# - 5335:5335/tcp # Uncomment to enable unbound access on local server # - 5335:5335/tcp # Uncomment to enable unbound access on local server
# - 22/tcp # Uncomment to enable SSH # - 22/tcp # Uncomment to enable SSH
environment: environment:
ServerIP: ${ServerIP} - FTLCONF_LOCAL_IPV4=${FTLCONF_LOCAL_IPV4}
TZ: ${TZ} - TZ=${TZ:-UTC}
WEBPASSWORD: ${WEBPASSWORD} - WEBPASSWORD=${WEBPASSWORD}
REV_SERVER: ${REV_SERVER} - WEBTHEME=${WEBTHEME:-default-light}
REV_SERVER_TARGET: ${REV_SERVER_TARGET} - REV_SERVER=${REV_SERVER:-false}
REV_SERVER_DOMAIN: ${REV_SERVER_DOMAIN} - REV_SERVER_TARGET=${REV_SERVER_TARGET}
REV_SERVER_CIDR: ${REV_SERVER_CIDR} - REV_SERVER_DOMAIN=${REV_SERVER_DOMAIN}
DNS1: 127.0.0.1#5335 # Hardcoded to our Unbound server - REV_SERVER_CIDR=${REV_SERVER_CIDR}
DNS2: 127.0.0.1#5335 # Hardcoded to our Unbound server - PIHOLE_DNS_=127.0.0.1#5335
DNSSEC: "true" # Enable DNSSEC - DNSSEC="true"
- DNSMASQ_LISTENING=single
volumes: volumes:
- etc_pihole-unbound:/etc/pihole:rw - etc_pihole-unbound:/etc/pihole:rw
- etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw - etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw
restart: unless-stopped restart: unless-stopped

View file

@ -0,0 +1 @@
edns-packet-max=1232

View file

@ -1,9 +1,12 @@
FROM pihole/pihole:2021.10.1 ARG PIHOLE_VERSION
FROM pihole/pihole:${PIHOLE_VERSION:-latest}
RUN apt update && apt install -y unbound RUN apt update && apt install -y unbound
COPY lighttpd-external.conf /etc/lighttpd/external.conf COPY lighttpd-external.conf /etc/lighttpd/external.conf
COPY unbound-pihole.conf /etc/unbound/unbound.conf.d/pi-hole.conf COPY unbound-pihole.conf /etc/unbound/unbound.conf.d/pi-hole.conf
COPY start_unbound_and_s6_init.sh start_unbound_and_s6_init.sh COPY 99-edns.conf /etc/dnsmasq.d/99-edns.conf
RUN mkdir -p /etc/services.d/unbound
COPY unbound-run /etc/services.d/unbound/run
ENTRYPOINT ./s6-init
RUN chmod +x start_unbound_and_s6_init.sh
ENTRYPOINT ./start_unbound_and_s6_init.sh

View file

@ -1 +1 @@
2021.10.1 2023.05.2

View file

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Run this once: docker buildx create --use --name build --node build --driver-opt network=host # Run this once: docker buildx create --use --name build --node build --driver-opt network=host
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t cbcrowe/pihole-unbound:`cat VERSION` --push . PIHOLE_VER=`cat VERSION`
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t cbcrowe/pihole-unbound:latest --push . docker buildx build --build-arg PIHOLE_VERSION=$PIHOLE_VER --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t cbcrowe/pihole-unbound:$PIHOLE_VER --push .
docker buildx build --build-arg PIHOLE_VERSION=$PIHOLE_VER --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t cbcrowe/pihole-unbound:latest --push .

View file

@ -1,3 +0,0 @@
#!/bin/bash -e
/etc/init.d/unbound start
/s6-init

View file

@ -34,7 +34,7 @@ server:
# Reduce EDNS reassembly buffer size. # Reduce EDNS reassembly buffer size.
# Suggested by the unbound man page to reduce fragmentation reassembly problems # Suggested by the unbound man page to reduce fragmentation reassembly problems
edns-buffer-size: 1472 edns-buffer-size: 1232
# Perform prefetching of close to expired message cache entries # Perform prefetching of close to expired message cache entries
# This only applies to domains that have been frequently queried # This only applies to domains that have been frequently queried
@ -44,7 +44,8 @@ server:
num-threads: 1 num-threads: 1
# Ensure kernel buffer is large enough to not lose messages in traffic spikes # Ensure kernel buffer is large enough to not lose messages in traffic spikes
so-rcvbuf: 1m # Be aware that if enabled (requires CAP_NET_ADMIN or privileged), the kernel buffer must have the defined amount of memory, if not, a warning will be raised.
#so-rcvbuf: 1m
# Ensure privacy of local IP ranges # Ensure privacy of local IP ranges
private-address: 192.168.0.0/16 private-address: 192.168.0.0/16

View file

@ -0,0 +1,25 @@
#!/command/with-contenv bash
s6-echo "Starting unbound"
NAME="unbound"
DESC="DNS server"
DAEMON="/usr/sbin/unbound"
PIDFILE="/run/unbound.pid"
HELPER="/usr/lib/unbound/package-helper"
test -x $DAEMON || exit 0
# Override this variable by editing or creating /etc/default/unbound.
DAEMON_OPTS=""
if [ -f /etc/default/unbound ]; then
. /etc/default/unbound
fi
$HELPER chroot_setup
$HELPER root_trust_anchor_update 2>&1 | logger -p daemon.info -t unbound-anchor
$DAEMON -d $DAEMON_OPTS

View file

@ -16,10 +16,9 @@ services:
- 80/tcp - 80/tcp
- 22/tcp - 22/tcp
environment: environment:
ServerIP: 192.168.1.5 - FTLCONF_LOCAL_IPV4=192.168.1.5
WEBPASSWORD: ${WEBPASSWORD} - WEBPASSWORD=${WEBPASSWORD}
DNS1: 192.168.1.6 - PIHOLE_DNS_=192.168.1.6;192.168.1.13
DNS2: 192.168.1.13
volumes: volumes:
- /volume1/docker/pihole-unbound/pihole/volume:/etc/pihole:rw - /volume1/docker/pihole-unbound/pihole/volume:/etc/pihole:rw
- /volume1/docker/pihole-unbound/pihole/config/hosts:/etc/hosts:ro - /volume1/docker/pihole-unbound/pihole/config/hosts:/etc/hosts:ro