From 672797b2292283e895df2abf086557b4fb5cda85 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sun, 3 Sep 2023 13:21:00 +0100 Subject: [PATCH] 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 1e293b0..e5c96cb 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