Allow overwriting of downloaded FTL binary at build time _if_ it exists in the /src directory

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2023-10-22 18:17:57 +01:00
parent 77ee293ac0
commit 4896d71937
No known key found for this signature in database
2 changed files with 7 additions and 0 deletions

2
.gitignore vendored
View File

@ -16,3 +16,5 @@ var-log/
# WIP/test stuff
doco.yml
src/pihole-FTL

View File

@ -70,6 +70,11 @@ RUN cd /etc/.pihole && \
COPY --chmod=0755 bash_functions.sh /usr/bin/bash_functions.sh
COPY --chmod=0755 start.sh /usr/bin/start.sh
# Overwrite pihole-FTL binary from src directory if it exists
# Useful for testing local builds of pihole-FTL prior to the CI build completing
# See: https://stackoverflow.com/a/46801962
COPY --chmod=0755 pihole-FT[L] /usr/bin/pihole-FTL
HEALTHCHECK CMD dig +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1
ENTRYPOINT ["/sbin/tini", "--", "start.sh"]