Skip to content

Commit

Permalink
Introduce internal PIHOLE_TAG variable so that we can see what tag th…
Browse files Browse the repository at this point in the history
…e container is...

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
  • Loading branch information
PromoFaux committed Aug 4, 2021
1 parent 388f0f0 commit 3865e77
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.py
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions build.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions s6/debian-root/etc/cont-init.d/20-start.sh
Expand Up @@ -35,3 +35,5 @@ else
fi

pihole -v

echo " Container tag is: ${PIHOLE_TAG}"

0 comments on commit 3865e77

Please sign in to comment.