Skip to content

Commit 78aee9e

Browse files
authored
Merge pull request #1777 from pi-hole/development
2025.03.0
2 parents d82ce16 + c26f896 commit 78aee9e

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ services:
6767
- "80:80/tcp"
6868
# Default HTTPs Port. FTL will generate a self-signed certificate
6969
- "443:443/tcp"
70-
# Uncomment the below if using Pi-hole as your DHCP Server
70+
# Uncomment the line below if you are using Pi-hole as your DHCP server
7171
#- "67:67/udp"
72+
# Uncomment the line below if you are using Pi-hole as your NTP server
73+
#- "123:123/udp"
7274
environment:
7375
# Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
7476
TZ: 'Europe/London'
@@ -139,6 +141,7 @@ To explicitly set no password, set `FTLCONF_webserver_api_password: ''`.
139141
| `FTLCONF_[SETTING]` | unset | As per documentation | Customize pihole.toml with settings described in the [API Documentation](https://docs.pi-hole.net/api).<br><br>Replace `.` with `_`, e.g for `dns.dnssec=true` use `FTLCONF_dns_dnssec: 'true'`.<br/>Array type configs should be delimited with `;`.|
140142
| `PIHOLE_UID` | `1000` | Number | Overrides image's default pihole user id to match a host user id.<br/>**IMPORTANT**: id must not already be in use inside the container!|
141143
| `PIHOLE_GID` | `1000` | Number | Overrides image's default pihole group id to match a host group id.<br/>**IMPORTANT**: id must not already be in use inside the container!|
144+
| `WEBPASSWORD_FILE` | unset| `<Docker secret file>` | Set an Admin password using [Docker secrets](https://docs.docker.com/engine/swarm/secrets/). If `FTLCONF_webserver_api_password` is set, `WEBPASSWORD_FILE` is ignored. If `FTLCONF_webserver_api_password` is empty, and `WEBPASSWORD_FILE` is set to a valid readable file, then `FTLCONF_webserver_api_password` will be set to the contents of `WEBPASSWORD_FILE`. |
142145

143146
### Advanced Variables
144147

src/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ COPY --chmod=0755 start.sh /usr/bin/start.sh
8282
EXPOSE 53 53/udp
8383
EXPOSE 67/udp
8484
EXPOSE 80
85+
EXPOSE 123/udp
8586
EXPOSE 443
8687

8788
## Buildkit can do some fancy stuff and we can use it to either download FTL from ftl.pi-hole.net or use a local copy
@@ -98,7 +99,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then FTLARCH=amd64; \
9899
elif [ "$TARGETPLATFORM" = "linux/riscv64" ]; then FTLARCH=riscv64; \
99100
else FTLARCH=amd64; fi \
100101
&& echo "Arch: ${TARGETPLATFORM}, FTLARCH: ${FTLARCH}" \
101-
&& if [ "${FTL_BRANCH}" = "master" ]; then URL="https://github.com/pi-hole/ftl/releases/latest/download"; else URL="https://ftl.pi-hole.net/${FTL_BRANCH}"; fi \
102+
&& if [ "${FTL_BRANCH}" = "master" ]; then URL="https://github.com/pi-hole/ftl/releases/latest/download"; else URL="https://ftl.pi-hole.net/${FTL_BRANCH}"; fi \
102103
&& curl -sSL "${URL}/pihole-FTL-${FTLARCH}" -o /usr/bin/pihole-FTL \
103104
&& chmod +x /usr/bin/pihole-FTL \
104105
&& readelf -h /usr/bin/pihole-FTL || (echo "Error with downloaded FTL binary" && exit 1) \
@@ -112,6 +113,6 @@ RUN readelf -h /usr/bin/pihole-FTL || (echo "Error with local FTL binary" && ex
112113
# Use the appropriate FTL Install stage based on the FTL_SOURCE build-arg
113114
FROM ${FTL_SOURCE}-ftl-install AS final
114115

115-
HEALTHCHECK CMD dig +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1
116+
HEALTHCHECK CMD dig -p $(pihole-FTL --config dns.port) +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1
116117

117118
ENTRYPOINT ["start.sh"]

src/bash_functions.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ migrate_v5_configs() {
189189
}
190190

191191
setup_web_password() {
192+
if [ -z "${FTLCONF_webserver_api_password+x}" ] && [ -n "${WEBPASSWORD_FILE}" ] && [ -r "/run/secrets/${WEBPASSWORD_FILE}" ]; then
193+
echo " [i] Setting FTLCONF_webserver_api_password from file"
194+
export FTLCONF_webserver_api_password=$(<"/run/secrets/${WEBPASSWORD_FILE}")
195+
fi
196+
192197
# If FTLCONF_webserver_api_password is not set
193198
if [ -z "${FTLCONF_webserver_api_password+x}" ]; then
194199
# Is this already set to something other than blank (default) in FTL's config file? (maybe in a volume mount)

src/start.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ TRAP_TRIGGERED=0
1111

1212
start() {
1313

14-
local v5_volume=0
15-
1614
# The below functions are all contained in bash_functions.sh
1715
# shellcheck source=/dev/null
1816
. /usr/bin/bash_functions.sh

test/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG alpine_version="3.20"
2-
ARG docker_version="27.1.1"
1+
ARG alpine_version="3.21"
2+
ARG docker_version="28.0.0"
33

44
FROM docker:${docker_version}-cli-alpine${alpine_version}
55

0 commit comments

Comments
 (0)