Introduce internal PIHOLE_TAG variable so that we can see what tag the container is...

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2021-08-05 00:59:34 +01:00
parent 388f0f01a1
commit 3865e77c6e
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173
5 changed files with 8 additions and 1 deletions

View File

@ -46,6 +46,9 @@ 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

@ -71,6 +71,7 @@ def build(docker_repo: str, arch: str, debian_version: str, hub_tag: str, show_t
build_env = os.environ.copy()
build_env['PIHOLE_VERSION'] = FTL_VERSION
build_env['DEBIAN_VERSION'] = debian_version
build_env['PIHOLE_TAG'] = hub_tag
build_command = f'{time_arg} docker-compose -f build.yml build {cache_arg} --pull {arch}'
print(f' ::: Building {arch} into {create_tag}')
success = run_and_stream_command_output(build_command, build_env, verbose)

View File

@ -3,6 +3,7 @@ version: "3.7"
x-common-args: &common-args
PIHOLE_VERSION: ${PIHOLE_VERSION}
PIHOLE_TAG: ${PIHOLE_TAG}
NAME: pihole/pihole
MAINTAINER: adam@diginc.us
S6_VERSION: v2.1.0.2

View File

@ -89,7 +89,7 @@ sed -i $'s/)\s*reconfigurePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole
sed -i $'s/)\s*uninstallFunc/) unsupportedFunc/g' /usr/local/bin/pihole
# Inject a message into the debug scripts Operating System section to indicate that the debug log comes from a Docker system.
sed -i $'s/echo_current_diagnostic "Operating system"/echo_current_diagnostic "Operating system"\\\n log_write "${INFO} Official Pi-hole Docker Container"/g' /opt/pihole/piholeDebug.sh
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
touch /.piholeFirstBoot

View File

@ -35,3 +35,5 @@ else
fi
pihole -v
echo " Container tag is: ${PIHOLE_TAG}"