From 672797b2292283e895df2abf086557b4fb5cda85 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 3 Sep 2023 13:21:00 +0100 Subject: [PATCH 1/4] Remove the "INSTALL_DEV_TOOLS" environment variable in favour of "ADDITIONAL_PACKAGES", to allow user to add any package they wish to the container. Will be mentioned in README with a HERE BE DRAGONS warning. Signed-off-by: Adam Warner --- src/start.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/start.sh b/src/start.sh index 1e293b083..e5c96cb71 100644 --- a/src/start.sh +++ b/src/start.sh @@ -78,9 +78,19 @@ start() { echo " [i] pihole-FTL ($FTL_CMD) will be started as ${DNSMASQ_USER}" echo "" - # Install editors inside container if requested - if [ "${INSTALL_DEV_TOOLS:-0}" -gt 0 ]; then - apk add --no-cache nano less + # Install additional packages inside the container if requested + if [ -n "${ADDITIONAL_PACKAGES}" ]; then + echo " [i] Fetching APK repository metadata." + if ! apk update; then + echo " [i] Failed to fetch APK repository metadata." + else + echo " [i] Installing additional packages." + # shellcheck disable=SC2086 + if ! apk add --no-cache ${ADDITIONAL_PACKAGES}; then + echo " [i] Failed to install additional packages." + fi + fi + echo "" fi # Remove possible leftovers from previous pihole-FTL processes From 3ca2aea41c87012b97d68bcc71c8329d7f30b7df Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Thu, 21 Sep 2023 00:03:25 +0100 Subject: [PATCH 2/4] Add documentation Signed-off-by: Adam Warner --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68cb590e1..787b02917 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ There are other environment variables if you want to customize various things in ### Experimental Variables | Variable | Default | Value | Description | | -------- | ------- | ----- | ---------- | -|Left Blank for future expansion| | | | +| `ADDITIONAL_PACKAGES`| unset | Comma separated list of APKs | HERE BE DRAGONS. Mostly for development purposes, this just makes it easier for those of us that always like to have whatever additional tools we need inside the container for debugging | To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1` From b893784c09d86a96f00902f557041b211d994ff8 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 25 Sep 2023 17:27:16 +0100 Subject: [PATCH 3/4] Update README.md Signed-off-by: Adam Warner --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 787b02917..3e6ae4e82 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ There are other environment variables if you want to customize various things in ### Experimental Variables | Variable | Default | Value | Description | | -------- | ------- | ----- | ---------- | -| `ADDITIONAL_PACKAGES`| unset | Comma separated list of APKs | HERE BE DRAGONS. Mostly for development purposes, this just makes it easier for those of us that always like to have whatever additional tools we need inside the container for debugging | +| `ADDITIONAL_PACKAGES`| unset | Space separated list of APKs | HERE BE DRAGONS. Mostly for development purposes, this just makes it easier for those of us that always like to have whatever additional tools we need inside the container for debugging | To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1` From bf12b02636c0938b5b54fa7c348309b93bbd917b Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 25 Sep 2023 20:00:22 +0100 Subject: [PATCH 4/4] Update src/start.sh Co-authored-by: RD WebDesign Signed-off-by: Adam Warner --- src/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/start.sh b/src/start.sh index e5c96cb71..a5a150ce7 100644 --- a/src/start.sh +++ b/src/start.sh @@ -84,7 +84,7 @@ start() { if ! apk update; then echo " [i] Failed to fetch APK repository metadata." else - echo " [i] Installing additional packages." + echo " [i] Installing additional packages: ${ADDITIONAL_PACKAGES}." # shellcheck disable=SC2086 if ! apk add --no-cache ${ADDITIONAL_PACKAGES}; then echo " [i] Failed to install additional packages."