From f94fb54a18c85e7247f38beb86f5a45a8b8511af Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 19 Sep 2022 21:46:46 +0100 Subject: [PATCH 1/5] Some of these should not be user overridable Signed-off-by: Adam Warner --- src/Dockerfile | 7 +------ src/s6/debian-root/usr/local/bin/_startup.sh | 2 +- src/s6/debian-root/usr/local/bin/install.sh | 7 +++++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Dockerfile b/src/Dockerfile index 932fee161..f3d433263 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -2,11 +2,7 @@ ARG PIHOLE_BASE FROM "${PIHOLE_BASE:-ghcr.io/pi-hole/docker-pi-hole-base:bullseye-slim}" ARG PIHOLE_DOCKER_TAG -ENV PIHOLE_DOCKER_TAG "${PIHOLE_DOCKER_TAG}" - -ENV S6_OVERLAY_VERSION v3.1.1.2 - -ENV PIHOLE_INSTALL /etc/.pihole/automated\ install/basic-install.sh +RUN echo "${PIHOLE_DOCKER_TAG}" > /pihole.docker.tag ENTRYPOINT [ "/s6-init" ] @@ -33,7 +29,6 @@ ENV S6_KEEP_ENV 1 ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2 ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME 0 - ENV FTLCONF_LOCAL_IPV4 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER pihole diff --git a/src/s6/debian-root/usr/local/bin/_startup.sh b/src/s6/debian-root/usr/local/bin/_startup.sh index 211546104..a133b3c10 100755 --- a/src/s6/debian-root/usr/local/bin/_startup.sh +++ b/src/s6/debian-root/usr/local/bin/_startup.sh @@ -9,7 +9,7 @@ fi . /usr/local/bin/bash_functions.sh # shellcheck source=/dev/null -SKIP_INSTALL=true . "${PIHOLE_INSTALL}" +SKIP_INSTALL=true . /etc/.pihole/automated\ install/basic-install.sh echo " [i] Starting docker specific checks & setup for docker pihole/pihole" diff --git a/src/s6/debian-root/usr/local/bin/install.sh b/src/s6/debian-root/usr/local/bin/install.sh index f88a4ff75..440728620 100644 --- a/src/s6/debian-root/usr/local/bin/install.sh +++ b/src/s6/debian-root/usr/local/bin/install.sh @@ -27,8 +27,9 @@ esac } +DOCKER_TAG=$(cat /pihole.docker.tag) # Helps to have some additional tools in the dev image when debugging -if [[ "${PIHOLE_DOCKER_TAG}" = 'nightly' || "${PIHOLE_DOCKER_TAG}" = 'dev' ]]; then +if [[ "${DOCKER_TAG}" = 'nightly' || "${DOCKER_TAG}" = 'dev' ]]; then apt-get update apt-get install --no-install-recommends -y nano less rm -rf /var/lib/apt/lists/* @@ -36,6 +37,8 @@ fi detect_arch +S6_OVERLAY_VERSION=v3.1.1.2 + curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" | tar Jxpf - -C / curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" | tar Jxpf - -C / @@ -66,7 +69,7 @@ export PIHOLE_SKIP_OS_CHECK=true curl -sSL https://install.pi-hole.net | bash -sex -- --unattended # At this stage, if we are building a :nightly tag, then switch the Pi-hole install to dev versions -if [[ "${PIHOLE_DOCKER_TAG}" = 'nightly' ]]; then +if [[ "${DOCKER_TAG}" = 'nightly' ]]; then yes | pihole checkout dev fi From 913f11beb5841a1eff5e8c3565477c9e05b002cb Mon Sep 17 00:00:00 2001 From: danitorregrosa Date: Thu, 22 Sep 2022 22:55:21 +0200 Subject: [PATCH 2/5] S6_ARCH fix for rpi1 Resolves #1201 Signed-off-by: danitorregrosa --- src/s6/debian-root/usr/local/bin/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s6/debian-root/usr/local/bin/install.sh b/src/s6/debian-root/usr/local/bin/install.sh index 440728620..d0e31c94f 100644 --- a/src/s6/debian-root/usr/local/bin/install.sh +++ b/src/s6/debian-root/usr/local/bin/install.sh @@ -16,7 +16,7 @@ detect_arch() { amd64) S6_ARCH="x86_64";; armel) - S6_ARCH="arm";; + S6_ARCH="armhf";; armhf) S6_ARCH="armhf";; arm64) @@ -95,4 +95,4 @@ ln -s /macvendor.db /etc/pihole/macvendor.db if [ ! -f /.piholeFirstBoot ]; then touch /.piholeFirstBoot fi -echo 'Docker install successful' \ No newline at end of file +echo 'Docker install successful' From 4f9b854546598ed143e1dc4ae32afdb00cd4c11a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 24 Sep 2022 10:06:36 +0000 Subject: [PATCH 3/5] Bump actions/stale from 5 to 6 Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 7b59a025b..0f2e87eb6 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: issues: write steps: - - uses: actions/stale@v5 + - uses: actions/stale@v6 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 30 From 658f6de774f0a291ccbdb77aadedf7db11aab31a Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sat, 24 Sep 2022 15:11:27 +0100 Subject: [PATCH 4/5] FTL.port file is deprecated (see https://github.com/pi-hole/FTL/pull/1445) Signed-off-by: Adam Warner --- src/s6/debian-root/etc/s6-overlay/s6-rc.d/pihole-FTL/run | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/s6/debian-root/etc/s6-overlay/s6-rc.d/pihole-FTL/run b/src/s6/debian-root/etc/s6-overlay/s6-rc.d/pihole-FTL/run index e46b7606c..8503538ec 100755 --- a/src/s6/debian-root/etc/s6-overlay/s6-rc.d/pihole-FTL/run +++ b/src/s6/debian-root/etc/s6-overlay/s6-rc.d/pihole-FTL/run @@ -11,14 +11,13 @@ rm /run/pihole/FTL.sock 2> /dev/null # install /dev/null files to ensure they exist (create if non-existing, preserve if existing) mkdir -pm 0755 /run/pihole /var/log/pihole [[ ! -f /run/pihole-FTL.pid ]] && install /dev/null /run/pihole-FTL.pid -[[ ! -f /run/pihole-FTL.port ]] && install /dev/null /run/pihole-FTL.port [[ ! -f /var/log/pihole/FTL.log ]] && install /dev/null /var/log/pihole/FTL.log [[ ! -f /var/log/pihole/pihole.log ]] && install /dev/null /var/log/pihole/pihole.log [[ ! -f /etc/pihole/dhcp.leases ]] && install /dev/null /etc/pihole/dhcp.leases # Ensure that permissions are set so that pihole-FTL can edit all necessary files -chown pihole:pihole /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole/FTL.log /var/log/pihole/pihole.log /etc/pihole/dhcp.leases /run/pihole /etc/pihole -chmod 0644 /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole/FTL.log /var/log/pihole/pihole.log /etc/pihole/dhcp.leases +chown pihole:pihole /run/pihole-FTL.pid /var/log/pihole/FTL.log /var/log/pihole/pihole.log /etc/pihole/dhcp.leases /run/pihole /etc/pihole +chmod 0644 /run/pihole-FTL.pid /var/log/pihole/FTL.log /var/log/pihole/pihole.log /etc/pihole/dhcp.leases # Ensure that permissions are set so that pihole-FTL can edit the files. We ignore errors as the file may not (yet) exist chmod -f 0644 /etc/pihole/macvendor.db From 47fe743548790a0e569f6a651679984d4f92f05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20Hurtado=20G=C3=B3mez?= Date: Tue, 4 Oct 2022 10:14:30 +0200 Subject: [PATCH 5/5] Delete duplicate "that" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julio Hurtado Gómez --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aaaef0db1..e9a6068f8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ _If you absolutely cannot do this, some users [have reported](https://github.com/pi-hole/docker-pi-hole/issues/1042#issuecomment-1086728157) success in updating `libseccomp2` via backports on debian, or similar via updates on Ubuntu. You can try this workaround at your own risk_ (Note, you may also find that you need the latest `docker.io` (more details [here](https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/)) -- Some users [have reported issues](https://github.com/pi-hole/docker-pi-hole/issues/963#issuecomment-1095602502) with using the `--privileged` flag on `2022.04` and above. TL;DR, don't use that that mode, and be [explicit with the permitted caps](https://github.com/pi-hole/docker-pi-hole#note-on-capabilities) (if needed) instead +- Some users [have reported issues](https://github.com/pi-hole/docker-pi-hole/issues/963#issuecomment-1095602502) with using the `--privileged` flag on `2022.04` and above. TL;DR, don't use that mode, and be [explicit with the permitted caps](https://github.com/pi-hole/docker-pi-hole#note-on-capabilities) (if needed) instead - As of `2022.04.01`, setting `CAP_NET_ADMIN` is only required if you are using Pi-hole as your DHCP server. The container will only try to set caps that are explicitly granted (or natively available)