Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pi-hole/docker-pi-hole
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2025.02.7
Choose a base ref
...
head repository: pi-hole/docker-pi-hole
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2025.03.0
Choose a head ref
  • 18 commits
  • 5 files changed
  • 4 contributors

Commits on Feb 21, 2025

  1. Merge pull request #1732 from pi-hole/master

    Sync master back into development
    PromoFaux authored Feb 21, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    70d8e10 View commit details

Commits on Feb 23, 2025

  1. Honor configured DNS port for docker health check

    Signed-off-by: yubiuser <github@yubiuser.dev>
    yubiuser committed Feb 23, 2025
    Copy the full SHA
    12b4af3 View commit details
  2. Don't rely on env variable but get port from FTL itself

    Signed-off-by: yubiuser <github@yubiuser.dev>
    yubiuser committed Feb 23, 2025
    Copy the full SHA
    d09eb02 View commit details
  3. Reintroduce ability to set web password from using docker secrets.

    Works exactly as it did in v5
    
    Signed-off-by: Adam Warner <me@adamwarner.co.uk>
    PromoFaux committed Feb 23, 2025
    Copy the full SHA
    9d55d91 View commit details
  4. Merge pull request #1748 from pi-hole/password_file

    Reintroduce missed docker secret handling
    PromoFaux authored Feb 23, 2025
    Copy the full SHA
    278a78c View commit details
  5. Revert "Reintroduce missed docker secret handling"

    PromoFaux authored Feb 23, 2025
    Copy the full SHA
    fb53198 View commit details
  6. Merge pull request #1749 from pi-hole/revert-1748-password_file

    Revert "Reintroduce missed docker secret handling"
    PromoFaux authored Feb 23, 2025
    Copy the full SHA
    9b34ece View commit details
  7. Reintroduce ability to set web password from using docker secrets.

    Works exactly as it did in v5
    
    Signed-off-by: Adam Warner <me@adamwarner.co.uk>
    PromoFaux committed Feb 23, 2025
    Copy the full SHA
    9a2e3c6 View commit details
  8. Merge pull request #1750 from pi-hole/password_file

    Reintroduce missed docker secret handling (Redo)
    PromoFaux authored Feb 23, 2025
    Copy the full SHA
    838a020 View commit details

Commits on Feb 24, 2025

  1. Merge pull request #1746 from pi-hole/healthcheck

    Honor configured DNS port for docker health check
    yubiuser authored Feb 24, 2025
    Copy the full SHA
    6324ec7 View commit details

Commits on Feb 25, 2025

  1. WEBPASSWORD_FILE is mounted to /run/secrets

    Signed-off-by: yubiuser <github@yubiuser.dev>
    yubiuser committed Feb 25, 2025
    Copy the full SHA
    8ba706e View commit details
  2. Remove v5 migration leftover

    Signed-off-by: yubiuser <github@yubiuser.dev>
    yubiuser committed Feb 25, 2025
    Copy the full SHA
    4fa81da View commit details
  3. Update test docker container to Alpine 3.21 and docker_cli 28.0.0.

    Signed-off-by: yubiuser <github@yubiuser.dev>
    yubiuser committed Feb 25, 2025
    Copy the full SHA
    3258c32 View commit details

Commits on Mar 3, 2025

  1. Add 123/udp to docker compose example and Dockerfile

    Signed-off-by: casperklein <casperklein@users.noreply.github.com>
    casperklein committed Mar 3, 2025
    Copy the full SHA
    747787c View commit details
  2. Merge pull request #1768 from casperklein/patch-1

    Add NTP port to docker compose example & Dockerfile
    PromoFaux authored Mar 3, 2025
    Copy the full SHA
    a9b5267 View commit details

Commits on Mar 4, 2025

  1. Merge pull request #1760 from pi-hole/update/docker_cli

    Update test docker container to Alpine 3.21 and docker_cli 28.0.0.
    PromoFaux authored Mar 4, 2025
    Copy the full SHA
    e07a42c View commit details
  2. Merge pull request #1758 from pi-hole/secrets

    WEBPASSWORD_FILE is mounted to /run/secrets
    PromoFaux authored Mar 4, 2025
    Copy the full SHA
    c26f896 View commit details
  3. Merge pull request #1777 from pi-hole/development

    2025.03.0
    PromoFaux authored Mar 4, 2025
    Copy the full SHA
    78aee9e View commit details
Showing with 14 additions and 7 deletions.
  1. +4 −1 README.md
  2. +3 −2 src/Dockerfile
  3. +5 −0 src/bash_functions.sh
  4. +0 −2 src/start.sh
  5. +2 −2 test/Dockerfile
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -67,8 +67,10 @@ services:
- "80:80/tcp"
# Default HTTPs Port. FTL will generate a self-signed certificate
- "443:443/tcp"
# Uncomment the below if using Pi-hole as your DHCP Server
# Uncomment the line below if you are using Pi-hole as your DHCP server
#- "67:67/udp"
# Uncomment the line below if you are using Pi-hole as your NTP server
#- "123:123/udp"
environment:
# Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
TZ: 'Europe/London'
@@ -139,6 +141,7 @@ To explicitly set no password, set `FTLCONF_webserver_api_password: ''`.
| `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 `;`.|
| `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!|
| `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!|
| `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`. |

### Advanced Variables

5 changes: 3 additions & 2 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@ COPY --chmod=0755 start.sh /usr/bin/start.sh
EXPOSE 53 53/udp
EXPOSE 67/udp
EXPOSE 80
EXPOSE 123/udp
EXPOSE 443

## 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; \
elif [ "$TARGETPLATFORM" = "linux/riscv64" ]; then FTLARCH=riscv64; \
else FTLARCH=amd64; fi \
&& echo "Arch: ${TARGETPLATFORM}, FTLARCH: ${FTLARCH}" \
&& 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 \
&& 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 \
&& curl -sSL "${URL}/pihole-FTL-${FTLARCH}" -o /usr/bin/pihole-FTL \
&& chmod +x /usr/bin/pihole-FTL \
&& 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
# Use the appropriate FTL Install stage based on the FTL_SOURCE build-arg
FROM ${FTL_SOURCE}-ftl-install AS final

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

ENTRYPOINT ["start.sh"]
5 changes: 5 additions & 0 deletions src/bash_functions.sh
Original file line number Diff line number Diff line change
@@ -189,6 +189,11 @@ migrate_v5_configs() {
}

setup_web_password() {
if [ -z "${FTLCONF_webserver_api_password+x}" ] && [ -n "${WEBPASSWORD_FILE}" ] && [ -r "/run/secrets/${WEBPASSWORD_FILE}" ]; then
echo " [i] Setting FTLCONF_webserver_api_password from file"
export FTLCONF_webserver_api_password=$(<"/run/secrets/${WEBPASSWORD_FILE}")
fi

# If FTLCONF_webserver_api_password is not set
if [ -z "${FTLCONF_webserver_api_password+x}" ]; then
# Is this already set to something other than blank (default) in FTL's config file? (maybe in a volume mount)
2 changes: 0 additions & 2 deletions src/start.sh
Original file line number Diff line number Diff line change
@@ -11,8 +11,6 @@ TRAP_TRIGGERED=0

start() {

local v5_volume=0

# The below functions are all contained in bash_functions.sh
# shellcheck source=/dev/null
. /usr/bin/bash_functions.sh
4 changes: 2 additions & 2 deletions test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG alpine_version="3.20"
ARG docker_version="27.1.1"
ARG alpine_version="3.21"
ARG docker_version="28.0.0"

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