From e15017d69aa80446b6371e806b2d75632ff98814 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Fri, 14 Aug 2020 19:22:49 -0400 Subject: [PATCH 01/10] Update 20-start.sh Signed-off-by: Tyler Spires --- s6/debian-root/etc/cont-init.d/20-start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/s6/debian-root/etc/cont-init.d/20-start.sh b/s6/debian-root/etc/cont-init.d/20-start.sh index 10d58f7..3275925 100644 --- a/s6/debian-root/etc/cont-init.d/20-start.sh +++ b/s6/debian-root/etc/cont-init.d/20-start.sh @@ -14,7 +14,9 @@ $bashCmd /start.sh if [ -n "$PYTEST" ]; then sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)" fi -gravity.sh +if [ ! -n "$SKIPGRAVITYONBOOT" ]; then + gravity.sh +fi # Kill dnsmasq because s6 won't like it if it's running when s6 services start kill -9 $(pgrep pihole-FTL) || true From 7248b3c915332577aa36cb2ebbdc3f9b978a38ec Mon Sep 17 00:00:00 2001 From: Athrogate Date: Fri, 14 Aug 2020 20:03:00 -0400 Subject: [PATCH 02/10] Update 20-start.sh Signed-off-by: Tyler Spires --- s6/debian-root/etc/cont-init.d/20-start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s6/debian-root/etc/cont-init.d/20-start.sh b/s6/debian-root/etc/cont-init.d/20-start.sh index 3275925..1f68689 100644 --- a/s6/debian-root/etc/cont-init.d/20-start.sh +++ b/s6/debian-root/etc/cont-init.d/20-start.sh @@ -14,7 +14,7 @@ $bashCmd /start.sh if [ -n "$PYTEST" ]; then sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)" fi -if [ ! -n "$SKIPGRAVITYONBOOT" ]; then +if [ -z "$SKIPGRAVITYONBOOT" ]; then gravity.sh fi From 8770b9789be4e256962cd18c63539572f82c91a4 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Fri, 14 Aug 2020 20:17:24 -0400 Subject: [PATCH 03/10] Update 20-start.sh Signed-off-by: Tyler Spires --- s6/debian-root/etc/cont-init.d/20-start.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/s6/debian-root/etc/cont-init.d/20-start.sh b/s6/debian-root/etc/cont-init.d/20-start.sh index 1f68689..5c92d59 100644 --- a/s6/debian-root/etc/cont-init.d/20-start.sh +++ b/s6/debian-root/etc/cont-init.d/20-start.sh @@ -16,6 +16,8 @@ if [ -n "$PYTEST" ]; then fi if [ -z "$SKIPGRAVITYONBOOT" ]; then gravity.sh +else + echo " Skipping Gravity Database Update." fi # Kill dnsmasq because s6 won't like it if it's running when s6 services start From a30bd0528fde5a89d74ef941a5abe525a3f9f279 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Sat, 22 Aug 2020 17:12:41 -0400 Subject: [PATCH 04/10] Update README.md Signed-off-by: Tyler Spires --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a05db6..49b3c92 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ There are other environment variables if you want to customize various things in | `DNSMASQ_USER: `
*Experimental Default: root* | Allows running FTLDNS as non-root. | `TEMPERATUREUNIT`:
*Optional Default: c* | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units. | `WEBUIBOXEDLAYOUT: `
*Optional Default: boxed* | Use boxed layout (helpful when working on large screens) - +| `SKIPGRAVITYONBOOT`: *Optional Default: Not Set | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be update by default. Set this environmental variable to 1 (or anything) and updating the Gravity Database will be skipped at the container startup. To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1` Here is a rundown of other arguments for your docker-compose / docker run. From a9f423ff37181676beb32592d245fb5aa6c9c514 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Sat, 22 Aug 2020 17:14:31 -0400 Subject: [PATCH 05/10] Update README.md Signed-off-by: Tyler Spires --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49b3c92..fb1a283 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,8 @@ There are other environment variables if you want to customize various things in | `DNSMASQ_USER: `
*Experimental Default: root* | Allows running FTLDNS as non-root. | `TEMPERATUREUNIT`:
*Optional Default: c* | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units. | `WEBUIBOXEDLAYOUT: `
*Optional Default: boxed* | Use boxed layout (helpful when working on large screens) -| `SKIPGRAVITYONBOOT`: *Optional Default: Not Set | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be update by default. Set this environmental variable to 1 (or anything) and updating the Gravity Database will be skipped at the container startup. +| `SKIPGRAVITYONBOOT`:
*Optional Default: Not Set | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be update by default. Set this environmental variable to 1 (or anything) and updating the Gravity Database will be skipped at the container startup. + To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1` Here is a rundown of other arguments for your docker-compose / docker run. From 6e5bf7159525e974e39baa2c279910e737ba5ac1 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Sat, 22 Aug 2020 17:15:27 -0400 Subject: [PATCH 06/10] Update README.md Signed-off-by: Tyler Spires --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb1a283..504aa8f 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ There are other environment variables if you want to customize various things in | `DNSMASQ_USER: `
*Experimental Default: root* | Allows running FTLDNS as non-root. | `TEMPERATUREUNIT`:
*Optional Default: c* | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units. | `WEBUIBOXEDLAYOUT: `
*Optional Default: boxed* | Use boxed layout (helpful when working on large screens) -| `SKIPGRAVITYONBOOT`:
*Optional Default: Not Set | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be update by default. Set this environmental variable to 1 (or anything) and updating the Gravity Database will be skipped at the container startup. +| `SKIPGRAVITYONBOOT`:
*Optional Default: Not Set* | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be update by default. Set this environmental variable to 1 (or anything) and updating the Gravity Database will be skipped at the container startup. To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1` From 5a35eca5e26f99b1d2c66ea49655f1612a9b9e97 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Sat, 22 Aug 2020 17:17:51 -0400 Subject: [PATCH 07/10] Update README.md Signed-off-by: Tyler Spires --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 504aa8f..4e18aeb 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ There are other environment variables if you want to customize various things in | `DNSMASQ_USER: `
*Experimental Default: root* | Allows running FTLDNS as non-root. | `TEMPERATUREUNIT`:
*Optional Default: c* | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units. | `WEBUIBOXEDLAYOUT: `
*Optional Default: boxed* | Use boxed layout (helpful when working on large screens) -| `SKIPGRAVITYONBOOT`:
*Optional Default: Not Set* | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be update by default. Set this environmental variable to 1 (or anything) and updating the Gravity Database will be skipped at the container startup. +| `SKIPGRAVITYONBOOT`:
*Optional Default: Not Set* | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be updated when the container starts up. Setting this environmental variable to 1 (or anything) will cause the Gravity Database to not be updated when container starts up. To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1` From 97d00cd936c6d805e68fb697539b94767aff9bfd Mon Sep 17 00:00:00 2001 From: Athrogate Date: Sat, 22 Aug 2020 17:19:30 -0400 Subject: [PATCH 08/10] Update README.md Documenting the SKIPGRAVITYONBOOT variable. Signed-off-by: Tyler Spires --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e18aeb..dddb584 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ There are other environment variables if you want to customize various things in | `DNSMASQ_USER: `
*Experimental Default: root* | Allows running FTLDNS as non-root. | `TEMPERATUREUNIT`:
*Optional Default: c* | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units. | `WEBUIBOXEDLAYOUT: `
*Optional Default: boxed* | Use boxed layout (helpful when working on large screens) -| `SKIPGRAVITYONBOOT`:
*Optional Default: Not Set* | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be updated when the container starts up. Setting this environmental variable to 1 (or anything) will cause the Gravity Database to not be updated when container starts up. +| `SKIPGRAVITYONBOOT`:
*Optional Default: Not Set* | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be updated when the container starts up. Setting this environment variable to 1 (or anything) will cause the Gravity Database to not be updated when container starts up. To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1` From a779c7fc37a38d911b66bc78fb714de782e0d519 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 28 Sep 2020 17:12:03 -0400 Subject: [PATCH 09/10] Make the default debian version buster, preserve the 'stretch' tag for those who need it. Signed-off-by: Daniel --- README.md | 4 ++-- build.yml | 16 ++++++++-------- gh-actions-test.sh | 2 +- gh-actions-vars.sh | 4 ++-- test/conftest.py | 2 +- test/test_volume_data.sh | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f834f60..eaebd04 100644 --- a/README.md +++ b/README.md @@ -185,8 +185,8 @@ The primary docker tags / versions are explained in the following table. [Click | --- | ------------ | ----------- | ---------- | | `latest` | auto detect | x86, arm, or arm64 container, docker auto detects your architecture. | [Dockerfile](https://github.com/pi-hole/docker-pi-hole/blob/master/Dockerfile) | | `v5.0` | auto detect | Versioned tags, if you want to pin against a specific Pi-hole version, use one of these | | -| `v5.0-stretch` | auto detect | Versioned tags, if you want to pin against a specific Pi-hole and Debian version, use one of these | | -| `v5.0--stretch` | based on tag | Specific architectures and Debian version tags | | +| `v5.0-buster` | auto detect | Versioned tags, if you want to pin against a specific Pi-hole and Debian version, use one of these | | +| `v5.0--buster ` | based on tag | Specific architectures and Debian version tags | | | `dev` | auto detect | like latest tag, but for the development branch (pushed occasionally) | | ### `pihole/pihole:latest` [![](https://images.microbadger.com/badges/image/pihole/pihole:latest.svg)](https://microbadger.com/images/pihole/pihole "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/pihole/pihole:latest.svg)](https://microbadger.com/images/pihole/pihole "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/version/pihole/pihole:latest.svg)](https://microbadger.com/images/pihole/pihole "Get your own version badge on microbadger.com") diff --git a/build.yml b/build.yml index 0a33a7c..4e0b783 100644 --- a/build.yml +++ b/build.yml @@ -12,38 +12,38 @@ x-common-args: &common-args services: amd64: - image: pihole:${PIHOLE_VERSION}-amd64-${DEBIAN_VERSION:-stretch} + image: pihole:${PIHOLE_VERSION}-amd64-${DEBIAN_VERSION:-buster} build: context: . args: <<: *common-args - PIHOLE_BASE: pihole/debian-base:${DEBIAN_VERSION:-stretch} + PIHOLE_BASE: pihole/debian-base:${DEBIAN_VERSION:-buster} PIHOLE_ARCH: amd64 S6_ARCH: amd64 armel: - image: pihole:${PIHOLE_VERSION}-armel-${DEBIAN_VERSION:-stretch} + image: pihole:${PIHOLE_VERSION}-armel-${DEBIAN_VERSION:-buster} build: context: . args: <<: *common-args - PIHOLE_BASE: multiarch/debian-debootstrap:armel-${DEBIAN_VERSION:-stretch}-slim + PIHOLE_BASE: multiarch/debian-debootstrap:armel-${DEBIAN_VERSION:-buster}-slim PIHOLE_ARCH: armel S6_ARCH: arm armhf: - image: pihole:${PIHOLE_VERSION}-armhf-${DEBIAN_VERSION:-stretch} + image: pihole:${PIHOLE_VERSION}-armhf-${DEBIAN_VERSION:-buster} build: context: . args: <<: *common-args - PIHOLE_BASE: multiarch/debian-debootstrap:armhf-${DEBIAN_VERSION:-stretch}-slim + PIHOLE_BASE: multiarch/debian-debootstrap:armhf-${DEBIAN_VERSION:-buster}-slim PIHOLE_ARCH: arm S6_ARCH: arm arm64: - image: pihole:${PIHOLE_VERSION}-arm64-${DEBIAN_VERSION:-stretch} + image: pihole:${PIHOLE_VERSION}-arm64-${DEBIAN_VERSION:-buster} build: context: . args: <<: *common-args - PIHOLE_BASE: multiarch/debian-debootstrap:arm64-${DEBIAN_VERSION:-stretch}-slim + PIHOLE_BASE: multiarch/debian-debootstrap:arm64-${DEBIAN_VERSION:-buster}-slim PIHOLE_ARCH: arm64 S6_ARCH: aarch64 diff --git a/gh-actions-test.sh b/gh-actions-test.sh index 691ab16..b4ab996 100755 --- a/gh-actions-test.sh +++ b/gh-actions-test.sh @@ -5,7 +5,7 @@ set -ex # # @environment ${ARCH} The architecture to build. Example: amd64. # @environment ${DEBIAN_VERSION} Debian version to build. ('buster' or 'stretch'). -# @environment ${ARCH_IMAGE} What the Docker Hub Image should be tagged as. Example: pihole/pihole:master-amd64-stretch +# @environment ${ARCH_IMAGE} What the Docker Hub Image should be tagged as. Example: pihole/pihole:master-amd64-buster # setup qemu/variables docker run --rm --privileged multiarch/qemu-user-static:register --reset > /dev/null diff --git a/gh-actions-vars.sh b/gh-actions-vars.sh index 6361698..856b04d 100755 --- a/gh-actions-vars.sh +++ b/gh-actions-vars.sh @@ -2,14 +2,14 @@ set -a # @environment ${ARCH} The architecture to build. Defaults to 'amd64'. -# @environment ${DEBIAN_VERSION} Debian version to build. Defaults to 'stretch'. +# @environment ${DEBIAN_VERSION} Debian version to build. Defaults to 'buster'. # @environment ${DOCKER_HUB_REPO} The docker hub repo to tag images for. Defaults to 'pihole'. # @environment ${DOCKER_HUB_IMAGE_NAME} The name of the resulting image. Defaults to 'pihole'. GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD | sed "s/\//-/g") GIT_TAG=$(git describe --tags --exact-match 2> /dev/null || true) -DEFAULT_DEBIAN_VERSION="stretch" +DEFAULT_DEBIAN_VERSION="buster" if [[ -z "${ARCH}" ]]; then ARCH="amd64" diff --git a/test/conftest.py b/test/conftest.py index 61d68fd..127f957 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -9,7 +9,7 @@ import types local_host = testinfra.get_host('local://') check_output = local_host.check_output -DEBIAN_VERSION = os.environ.get('DEBIAN_VERSION', 'stretch') +DEBIAN_VERSION = os.environ.get('DEBIAN_VERSION', 'buster') __version__ = None dotdot = os.path.abspath(os.path.join(os.path.abspath(__file__), os.pardir, os.pardir)) with open('{}/VERSION'.format(dotdot), 'r') as v: diff --git a/test/test_volume_data.sh b/test/test_volume_data.sh index 0acf9b2..f82a8e4 100755 --- a/test/test_volume_data.sh +++ b/test/test_volume_data.sh @@ -33,7 +33,7 @@ trap "cleanup" INT TERM EXIT # VOLUME TESTS # Given... -DEBIAN_VERSION="$(DEBIAN_VERSION:-stretch)" +DEBIAN_VERSION="$(DEBIAN_VERSION:-buster)" IMAGE="${1:-pihole:v5.0-amd64}-${DEBIAN_VERSION}" # Default is latest build test image (generic, non release/branch tag) VOLUMES="$(mktemp -d)" # A fresh volume directory VOL_PH="$VOLUMES/pihole" From e64f2d682bc1d55fc860abe7391ecff4f61646a6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 12 Nov 2020 15:51:20 -0500 Subject: [PATCH 10/10] Lock Python version to 3.8 since it is being referenced in SED command Signed-off-by: Daniel --- Dockerfile_build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile_build b/Dockerfile_build index 70e5a28..4ed513b 100644 --- a/Dockerfile_build +++ b/Dockerfile_build @@ -1,4 +1,4 @@ -FROM python:buster +FROM python:3.8-buster # Only works for docker CLIENT (bind mounted socket) COPY --from=docker:18.09.3 /usr/local/bin/docker /usr/local/bin/