mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2025-12-20 02:18:51 +00:00
14
.github/workflows/build-and-publish.yml
vendored
14
.github/workflows/build-and-publish.yml
vendored
@@ -31,10 +31,8 @@ jobs:
|
|||||||
runner: ubuntu-24.04-arm
|
runner: ubuntu-24.04-arm
|
||||||
- platform: linux/arm64
|
- platform: linux/arm64
|
||||||
runner: ubuntu-24.04-arm
|
runner: ubuntu-24.04-arm
|
||||||
# Drop this for the time being. bind-tools is failing to install on riscv64, and I don't have time to dig into it currently.exclude:
|
- platform: linux/riscv64
|
||||||
# It is unlikely that there are a lot of Pi-hole users on riscv64 architecture, let alone Docker users.
|
runner: ubuntu-24.04-arm
|
||||||
# - platform: linux/riscv64
|
|
||||||
# runner: ubuntu-24.04-arm
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare name for digest up/download
|
- name: Prepare name for digest up/download
|
||||||
@@ -45,19 +43,19 @@ jobs:
|
|||||||
- &checkout-repo
|
- &checkout-repo
|
||||||
name: Checkout Repo
|
name: Checkout Repo
|
||||||
if: github.event_name != 'schedule'
|
if: github.event_name != 'schedule'
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
|
|
||||||
- &checkout-dev
|
- &checkout-dev
|
||||||
name: Checkout dev branch if scheduled
|
name: Checkout dev branch if scheduled
|
||||||
if: github.event_name == 'schedule'
|
if: github.event_name == 'schedule'
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
with:
|
with:
|
||||||
ref: development
|
ref: development
|
||||||
|
|
||||||
- &docker-meta
|
- &docker-meta
|
||||||
name: Docker meta
|
name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #v5.8.0
|
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 #v5.9.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
images: |
|
images: |
|
||||||
@@ -87,7 +85,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 #v3.7.0
|
||||||
with:
|
with:
|
||||||
platforms: ${{ matrix.platform}}
|
platforms: ${{ matrix.platform}}
|
||||||
|
|
||||||
|
|||||||
10
.github/workflows/build-and-test.yml
vendored
10
.github/workflows/build-and-test.yml
vendored
@@ -19,18 +19,16 @@ jobs:
|
|||||||
runner: ubuntu-24.04-arm
|
runner: ubuntu-24.04-arm
|
||||||
- platform: linux/arm64
|
- platform: linux/arm64
|
||||||
runner: ubuntu-24.04-arm
|
runner: ubuntu-24.04-arm
|
||||||
# Drop this for the time being. bind-tools is failing to install on riscv64, and I don't have time to dig into it currently.exclude:
|
- platform: linux/riscv64
|
||||||
# It is unlikely that there are a lot of Pi-hole users on riscv64 architecture, let alone Docker users.
|
runner: ubuntu-24.04-arm
|
||||||
# - platform: linux/riscv64
|
|
||||||
# runner: ubuntu-24.04-arm
|
|
||||||
env:
|
env:
|
||||||
CI_ARCH: ${{ matrix.platform }}
|
CI_ARCH: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 #v3.7.0
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
|
||||||
|
|||||||
4
.github/workflows/codespell.yml
vendored
4
.github/workflows/codespell.yml
vendored
@@ -10,9 +10,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
-
|
-
|
||||||
name: Spell-Checking
|
name: Spell-Checking
|
||||||
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 #v2.1
|
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 #v2.2
|
||||||
with:
|
with:
|
||||||
ignore_words_file: .codespellignore
|
ignore_words_file: .codespellignore
|
||||||
|
|||||||
23
.github/workflows/dockerhub-description.yml
vendored
Normal file
23
.github/workflows/dockerhub-description.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Update Docker Hub Description
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- README.md
|
||||||
|
- .github/workflows/dockerhub-description.yml
|
||||||
|
jobs:
|
||||||
|
dockerHubDescription:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
|
|
||||||
|
- name: Docker Hub Description
|
||||||
|
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa #v5
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
||||||
|
repository: pihole/pihole
|
||||||
|
short-description: ${{ github.event.repository.description }}
|
||||||
2
.github/workflows/editorconfig.yml
vendored
2
.github/workflows/editorconfig.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
|
|
||||||
- name: Get editorconfig-checker
|
- name: Get editorconfig-checker
|
||||||
uses: editorconfig-checker/action-editorconfig-checker@4b6cd6190d435e7e084fb35e36a096e98506f7b9 #v2.1.0
|
uses: editorconfig-checker/action-editorconfig-checker@4b6cd6190d435e7e084fb35e36a096e98506f7b9 #v2.1.0
|
||||||
|
|||||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
- name: Remove 'stale' label
|
- name: Remove 'stale' label
|
||||||
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
|
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
.github/workflows/sync-back-to-dev.yml
vendored
2
.github/workflows/sync-back-to-dev.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
name: Syncing branches
|
name: Syncing branches
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
|
||||||
- name: Opening pull request
|
- name: Opening pull request
|
||||||
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
|
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ services:
|
|||||||
TZ: 'Europe/London'
|
TZ: 'Europe/London'
|
||||||
# Set a password to access the web interface. Not setting one will result in a random password being assigned
|
# Set a password to access the web interface. Not setting one will result in a random password being assigned
|
||||||
FTLCONF_webserver_api_password: 'correct horse battery staple'
|
FTLCONF_webserver_api_password: 'correct horse battery staple'
|
||||||
# If using Docker's default `bridge` network setting the dns listening mode should be set to 'all'
|
# If using Docker's default `bridge` network setting the dns listening mode should be set to 'ALL'
|
||||||
FTLCONF_dns_listeningMode: 'all'
|
FTLCONF_dns_listeningMode: 'ALL'
|
||||||
# Volumes store your data between container upgrades
|
# Volumes store your data between container upgrades
|
||||||
volumes:
|
volumes:
|
||||||
# For persisting Pi-hole's databases and common configuration file
|
# For persisting Pi-hole's databases and common configuration file
|
||||||
@@ -300,6 +300,8 @@ We have noticed that a lot of people use Watchtower to keep their Pi-hole contai
|
|||||||
- If you care about your data (logs/customizations), make sure you have it volume-mapped or it will be deleted in this step.
|
- If you care about your data (logs/customizations), make sure you have it volume-mapped or it will be deleted in this step.
|
||||||
- Recreate the container using the new image.
|
- Recreate the container using the new image.
|
||||||
|
|
||||||
|
To exclude the Pi-hole container from Watchtower's auto-update system take a look at [Full Exclude](https://containrrr.dev/watchtower/container-selection/#full_exclude) in Watchtower's docs.
|
||||||
|
|
||||||
Pi-hole is an integral part of your network, don't let it fall over because of an unattended update in the middle of the night.
|
Pi-hole is an integral part of your network, don't let it fall over because of an unattended update in the middle of the night.
|
||||||
|
|
||||||
# User Feedback
|
# User Feedback
|
||||||
|
|||||||
32
src/start.sh
32
src/start.sh
@@ -58,6 +58,13 @@ start() {
|
|||||||
fix_capabilities
|
fix_capabilities
|
||||||
sh /opt/pihole/pihole-FTL-prestart.sh
|
sh /opt/pihole/pihole-FTL-prestart.sh
|
||||||
|
|
||||||
|
# Get the FTL log file path from the config
|
||||||
|
FTLlogFile=$(getFTLConfigValue files.log.ftl)
|
||||||
|
|
||||||
|
# Get the EOF position of the FTL log file so that we can tail from there later.
|
||||||
|
local startFrom
|
||||||
|
startFrom=$(stat -c%s "${FTLlogFile}")
|
||||||
|
|
||||||
echo " [i] Starting pihole-FTL ($FTL_CMD) as ${DNSMASQ_USER}"
|
echo " [i] Starting pihole-FTL ($FTL_CMD) as ${DNSMASQ_USER}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -70,18 +77,11 @@ start() {
|
|||||||
# We need the PID of the capsh process so that we can wait for it to finish
|
# We need the PID of the capsh process so that we can wait for it to finish
|
||||||
CAPSH_PID=$!
|
CAPSH_PID=$!
|
||||||
|
|
||||||
# Get the FTL log file path from the config
|
# Wait for FTL to start by monitoring the FTL log file for the "FTL started" line
|
||||||
FTLlogFile=$(getFTLConfigValue files.log.ftl)
|
if ! timeout 30 tail -F -c +$((startFrom + 1)) -- "${FTLlogFile}" | grep -q '########## FTL started'; then
|
||||||
|
echo " [!] ERROR: Did not find 'FTL started' message in ${FTLlogFile} in 30 seconds, stopping container"
|
||||||
# Wait until the log file exists before continuing
|
exit 1
|
||||||
while [ ! -f "${FTLlogFile}" ]; do
|
fi
|
||||||
sleep 0.5
|
|
||||||
done
|
|
||||||
|
|
||||||
# Wait until the FTL log contains the "FTL started" message before continuing
|
|
||||||
while ! grep -q '########## FTL started' "${FTLlogFile}"; do
|
|
||||||
sleep 0.5
|
|
||||||
done
|
|
||||||
|
|
||||||
pihole updatechecker
|
pihole updatechecker
|
||||||
local versionsOutput
|
local versionsOutput
|
||||||
@@ -91,11 +91,8 @@ start() {
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ "${TAIL_FTL_LOG:-1}" -eq 1 ]; then
|
if [ "${TAIL_FTL_LOG:-1}" -eq 1 ]; then
|
||||||
# Start tailing the FTL log from the most recent "FTL Started" message
|
# Start tailing the FTL log file from the EOF position we recorded on container start
|
||||||
# Get the line number
|
tail -F -c +$((startFrom + 1)) -- "${FTLlogFile}" &
|
||||||
startFrom=$(grep -n '########## FTL started' "${FTLlogFile}" | tail -1 | cut -d: -f1)
|
|
||||||
# Start the tail from the line number and background it
|
|
||||||
tail --follow=name -n +"${startFrom}" "${FTLlogFile}" &
|
|
||||||
else
|
else
|
||||||
echo " [i] FTL log output is disabled. Remove the Environment variable TAIL_FTL_LOG, or set it to 1 to enable FTL log output."
|
echo " [i] FTL log output is disabled. Remove the Environment variable TAIL_FTL_LOG, or set it to 1 to enable FTL log output."
|
||||||
fi
|
fi
|
||||||
@@ -104,7 +101,6 @@ start() {
|
|||||||
wait $CAPSH_PID
|
wait $CAPSH_PID
|
||||||
FTL_EXIT_CODE=$?
|
FTL_EXIT_CODE=$?
|
||||||
|
|
||||||
|
|
||||||
# If we are here, then FTL has exited.
|
# If we are here, then FTL has exited.
|
||||||
# If the trap was triggered, then stop will have already been called
|
# If the trap was triggered, then stop will have already been called
|
||||||
if [ $TRAP_TRIGGERED -eq 0 ]; then
|
if [ $TRAP_TRIGGERED -eq 0 ]; then
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
pytest == 8.4.2
|
pytest == 9.0.1
|
||||||
pytest-testinfra == 10.2.2
|
pytest-testinfra == 10.2.2
|
||||||
pytest-clarity == 1.0.1
|
pytest-clarity == 1.0.1
|
||||||
tox == 4.32.0
|
tox == 4.32.0
|
||||||
|
|||||||
Reference in New Issue
Block a user