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 <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2023-09-03 13:21:00 +01:00
parent bb3eee6665
commit 672797b229
No known key found for this signature in database
1 changed files with 13 additions and 3 deletions

View File

@ -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