Add an addional version injection case, for when core versions are not on alternative branches.

Move ENV VAR up higher in the Dockerfile so that `install.sh` actually sees it...

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2021-08-06 01:27:45 +01:00
parent 88518b036d
commit 56f4933237
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173
2 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,8 @@ FROM $PIHOLE_BASE
ARG PIHOLE_ARCH
ENV PIHOLE_ARCH "${PIHOLE_ARCH}"
ARG PIHOLE_TAG
ENV PIHOLE_TAG "${PIHOLE_TAG}"
ARG S6_ARCH
ARG S6_VERSION
ENV S6OVERLAY_RELEASE "https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-${S6_ARCH}.tar.gz"
@ -46,9 +48,6 @@ ARG PIHOLE_VERSION
ENV VERSION "${PIHOLE_VERSION}"
ENV PATH /opt/pihole:${PATH}
ARG PIHOLE_TAG
ENV PIHOLE_TAG "${PIHOLE_TAG}"
ARG NAME
LABEL image="${NAME}:${PIHOLE_VERSION}_${PIHOLE_ARCH}"
ARG MAINTAINER

View File

@ -92,7 +92,8 @@ sed -i $'s/)\s*uninstallFunc/) unsupportedFunc/g' /usr/local/bin/pihole
sed -i $'s/echo_current_diagnostic "Operating system"/echo_current_diagnostic "Operating system"\\\n log_write "${INFO} Pi-hole Docker Container: ${PIHOLE_TAG:-PIHOLE_TAG is unset}"/g' /opt/pihole/piholeDebug.sh
# Inject container tag into web interface footer...
sed -i $"s/<ul class=\"list-unstyled\">/<strong>Docker Tag<\/strong> ${PIHOLE_TAG//\//\\/}\\n<ul class=\"list-unstyled\">/g" /var/www/html/admin/scripts/pi-hole/php/footer.php
sed -i $"s/<ul class=\"list-unstyled\">/<ul class=\"list-unstyled\">\\n<strong><li>Docker Tag<\/strong> ${PIHOLE_TAG//\//\\/}<\/li>/g" /var/www/html/admin/scripts/pi-hole/php/footer.php
sed -i $"s/<ul class=\"list-inline\">/<strong>Docker Tag<\/strong> ${PIHOLE_TAG//\//\\/}\\n<ul class=\"list-inline\">/g" /var/www/html/admin/scripts/pi-hole/php/footer.php
touch /.piholeFirstBoot