From bf959614892152d039aa0c5aa9f50182a9616f74 Mon Sep 17 00:00:00 2001 From: Jens Brey Date: Sat, 9 Apr 2022 16:42:10 +0200 Subject: [PATCH 1/2] one-container: Migrated unbound to s6 supervise, update to latest pihole base image --- one-container/pihole-unbound/Dockerfile | 9 +++++---- one-container/pihole-unbound/VERSION | 2 +- .../pihole-unbound/start_unbound_and_s6_init.sh | 3 --- one-container/pihole-unbound/unbound-pihole.conf | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) delete mode 100755 one-container/pihole-unbound/start_unbound_and_s6_init.sh diff --git a/one-container/pihole-unbound/Dockerfile b/one-container/pihole-unbound/Dockerfile index 6e378ca..3833630 100644 --- a/one-container/pihole-unbound/Dockerfile +++ b/one-container/pihole-unbound/Dockerfile @@ -1,10 +1,11 @@ -FROM pihole/pihole:2022.02.1 +FROM pihole/pihole:2022.04.2 RUN apt update && apt install -y unbound COPY lighttpd-external.conf /etc/lighttpd/external.conf COPY unbound-pihole.conf /etc/unbound/unbound.conf.d/pi-hole.conf COPY 99-edns.conf /etc/dnsmasq.d/99-edns.conf -COPY start_unbound_and_s6_init.sh start_unbound_and_s6_init.sh +RUN mkdir /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 diff --git a/one-container/pihole-unbound/VERSION b/one-container/pihole-unbound/VERSION index 1f761d3..9b38786 100644 --- a/one-container/pihole-unbound/VERSION +++ b/one-container/pihole-unbound/VERSION @@ -1 +1 @@ -2022.02.1 +2022.04.2 diff --git a/one-container/pihole-unbound/start_unbound_and_s6_init.sh b/one-container/pihole-unbound/start_unbound_and_s6_init.sh deleted file mode 100755 index c7dd36a..0000000 --- a/one-container/pihole-unbound/start_unbound_and_s6_init.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -e -/etc/init.d/unbound start -/s6-init \ No newline at end of file diff --git a/one-container/pihole-unbound/unbound-pihole.conf b/one-container/pihole-unbound/unbound-pihole.conf index 9f1e9bf..43954d9 100644 --- a/one-container/pihole-unbound/unbound-pihole.conf +++ b/one-container/pihole-unbound/unbound-pihole.conf @@ -52,4 +52,4 @@ server: private-address: 172.16.0.0/12 private-address: 10.0.0.0/8 private-address: fd00::/8 - private-address: fe80::/10 \ No newline at end of file + private-address: fe80::/10 From 215d80f6012ec2ce0609a846ce8fe321868dd1e6 Mon Sep 17 00:00:00 2001 From: Jens Brey Date: Sat, 9 Apr 2022 16:50:37 +0200 Subject: [PATCH 2/2] Added unbound-run file for S6 --- one-container/pihole-unbound/unbound-run | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 one-container/pihole-unbound/unbound-run diff --git a/one-container/pihole-unbound/unbound-run b/one-container/pihole-unbound/unbound-run new file mode 100644 index 0000000..057d635 --- /dev/null +++ b/one-container/pihole-unbound/unbound-run @@ -0,0 +1,25 @@ +#!/usr/bin/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 +