Compare commits

...

1066 Commits

Author SHA1 Message Date
Adam Warner
a787e29aad Merge pull request #1245 from pi-hole/dev
Dev - > master
2022-11-27 21:46:10 +00:00
Adam Warner
8aa6623844 Merge pull request #1242 from th0r88/patch-1
Added the right public port for pihole config
2022-11-21 07:12:18 +00:00
Jan Ferme
91a174f976 Added the right public port for pihole config
Otherwise it doesn't work.

Signed-off-by: Jan Ferme <10115360+th0r88@users.noreply.github.com>
2022-11-21 01:00:18 +01:00
Adam Warner
41aa699aab Merge pull request #1234 from pi-hole/updatechecktiming
Ensure FTL is running before attempting to run functions/lines that require DNS resolution to be working
2022-11-09 18:03:53 +00:00
Adam Warner
f73c92d03b rename _gravityonboot service/script to _postFTL and move updatecheck/version output to this script
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-11-09 17:51:07 +00:00
Adam Warner
1f69a1ab83 Merge pull request #1232 from davidgatti/patch-1
Working docker compose command.
2022-11-08 12:17:02 +00:00
David Gatti
7f8862d73f Added -d option for detach. 2022-11-05 14:39:27 +01:00
David Gatti
069a88b7d1 Update README.md
Added the working command for Docker 2

Signed-off-by: David Gatti <dawid@gatti.io>
2022-11-05 08:50:04 +01:00
Adam Warner
b9f3aada94 Merge pull request #1225 from pi-hole/dev
Dev -> master before release
2022-10-10 22:02:18 +01:00
Adam Warner
dc4071f9a4 Merge pull request #1219 from juliohurtado/patch-1
Delete duplicate "that"
2022-10-06 19:11:45 +01:00
Julio Hurtado Gómez
1f3ced8d31 Merge branch 'dev' into patch-1 2022-10-06 16:23:47 +02:00
Julio Hurtado Gómez
47fe743548 Delete duplicate "that"
Signed-off-by: Julio Hurtado Gómez <kloner88@gmail.com>
2022-10-04 10:14:30 +02:00
Adam Warner
e4a7a11b88 Merge pull request #1216 from pi-hole/ftl-port-file-removal
Remove references to deprecated `pihole-FTL.port` file
2022-09-24 15:18:33 +01:00
Adam Warner
658f6de774 FTL.port file is deprecated (see https://github.com/pi-hole/FTL/pull/1445)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-09-24 15:11:27 +01:00
Adam Warner
fc8a679521 Merge pull request #1215 from pi-hole/dependabot/github_actions/dev/actions/stale-6
Bump actions/stale from 5 to 6
2022-09-24 13:10:02 +01:00
dependabot[bot]
4f9b854546 Bump actions/stale from 5 to 6
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-24 10:06:36 +00:00
Adam Warner
1eff43b6b7 Merge pull request #1214 from danitorregrosa/dev
S6_ARCH fix for rpi1
2022-09-22 22:19:31 +01:00
danitorregrosa
913f11beb5 S6_ARCH fix for rpi1
Resolves #1201

Signed-off-by: danitorregrosa <danitorregrosa@gmail.com>
2022-09-22 22:55:21 +02:00
Adam Warner
71d77b5fe8 Merge pull request #1212 from pi-hole/refactor-some-more
Change some variables so that they cannot be overridden by users
2022-09-20 09:16:07 +01:00
Adam Warner
f94fb54a18 Some of these should not be user overridable
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-09-19 21:46:46 +01:00
Adam Warner
a9ecd4e7a2 Merge pull request #1210 from lightswitch05/feature/cleanup-tests-and-test-dependencies
Remove old test dependencies, updated ones still being used. Introduce Black formatter
2022-09-18 11:58:12 +01:00
Daniel
4da66313f4 Remove old test dependencies, updated ones still being used. Introduce Black formatter 2022-09-17 04:28:01 +00:00
Adam Warner
2164220c69 Merge pull request #1204 from willman42/dev
init commit of Pi-hole behind Caddy example
2022-09-14 21:39:00 +01:00
William Trelawny
798c0e606f init commit of Pi-hole behind Caddy example
- Single docker compose file to spin up a Caddy and a Pi-hole container
- I put plenty of comments in compose file for user ref. Looks kinda
  messy but I figured the more info the better and they can cull out
what they dont need.
- DHCP server is disabled by default in Pi-hole so I disabled the port
  binding and NET_ADMIN capability by default as well, with brief
instructions and refs included.
- Caddy docker compose example ref: https://hub.docker.com/_/caddy
- Pi-hole Caddy config ref: https://docs.pi-hole.net/guides/webserver/caddy/

Signed-off-by: William Trelawny <william@trelawny.family>
2022-09-05 09:57:54 -04:00
Adam Warner
4ddb2f817d Merge pull request #1203 from pi-hole/master
sync: master to dev
2022-09-05 12:47:15 +01:00
Adam Warner
988c39581e Merge pull request #1202 from pi-hole/dev
Dev
2022-09-05 12:28:05 +01:00
Adam Warner
2f2395e5c0 Merge pull request #1200 from willman42/dev
fixed broken link to TESTING.md
2022-09-05 12:27:46 +01:00
William Trelawny (willman42)
0b9e9a5af6 fixed broken link to TESTING.md
Signed-off-by: William Trelawny (willman42) <william@trelawny.family>
2022-09-03 18:35:43 -04:00
Adam Warner
4a636fb7ba Merge pull request #1198 from labodj/master
Remove the email function
2022-09-03 08:43:57 +01:00
LaboDJ
540ca1e31f Remove the email function
It was removed from pi-hole in 5.12 by this PR https://github.com/pi-hole/pi-hole/pull/4870

Signed-off-by: LaboDJ <2527836+labodj@users.noreply.github.com>
2022-09-03 05:31:11 +02:00
Adam Warner
f044e58b5c Calrifications to experimental uid/gid changer variables
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-09-02 23:58:53 +01:00
Adam Warner
0d5a001916 also run remote update check on container startup
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-09-02 21:37:10 +01:00
Adam Warner
9d17bd9871 Update documentation per comments on #1155
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-09-02 18:14:10 +01:00
Adam Warner
de80425c87 Merge pull request #1168 from freddydumont/patch-1
Add systemd-resolved note for Fedora
2022-09-02 18:09:56 +01:00
Adam Warner
b18d9bd419 Merge pull request #1193 from pi-hole/dnsmasq-listening
Set FTL/DNSMASQ listening behaviour per variable if it is passed/
2022-08-29 17:16:32 +01:00
Adam Warner
0bbdd15073 Set FTL/DNSMASQ listening behaviour per variable if it is passed. Fixes #1188
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 17:12:58 +01:00
Adam Warner
a4c931f115 Merge pull request #1192 from pi-hole/s6-wait-maxtime
Prevent S6 timeouts on container start by setting S6_CMD_WAIT_FOR_SERVICES_MAXTIME to 0
2022-08-29 16:52:00 +01:00
Adam Warner
efd587bdd1 Read CAP_STR into an array and output one cap per line in startup
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 16:49:16 +01:00
Adam Warner
27980ed9cf Prevent S6 timeouts on container start by setting S6_CMD_WAIT_FOR_SERVICES_MAXTIME to 0, per https://github.com/just-containers/s6-overlay/issues/452
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 16:33:41 +01:00
Adam Warner
10c33ed871 Add note to readme about installingon Dokku, closes #1190
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 14:32:14 +01:00
Adam Warner
14c67ed729 capabilites ==> capabilities
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 13:22:50 +01:00
Adam Warner
69f64b963e Merge pull request #1191 from pi-hole/s6-tweaks
Tweaks to s6 service startup order to clarify logged output
2022-08-29 13:18:49 +01:00
Adam Warner
97f81bae21 Shuffle some files around, change dependencies to make output clearer, change ::: for [i] to further clarify output.
Allow for  PH_VERBOSE to set -x on all scripts that it would be useful for

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 13:17:22 +01:00
Adam Warner
2b60df6d2b Move uid/gid changer from legacy to new style.
Move deprecated dependencies file to dependencies.d for all services. Make cron depend on base

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 12:20:10 +01:00
Adam Warner
473117e8a8 Rename start and gravity scripts to match their service names
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:50:19 +01:00
Adam Warner
e6d4c3091f Move all scripts to /usr/local/bin to simplify dockerfile
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:48:07 +01:00
Adam Warner
55f4f89a0c remove some no-longer-referenced files
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:37:42 +01:00
Adam Warner
faffe6430f Remove the 01-resolver-resolv file - can't track down what it does from looking at commit history - functionality is deprecated
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:21:29 +01:00
Adam Warner
48c6192617 reintroduce ability to set verbose output
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 10:38:04 +01:00
Adam Warner
9d0162ebcc Merge pull request #1185 from pi-hole/tweak/PIHOLE_DNS_ARR
Test for empty values in the PIHOLE_DNS_ array, skip if it's empty
2022-08-27 08:16:08 +01:00
Adam Warner
939a69b895 Test for empty values in the PIHOLE_DNS_ array, skip if it's empty
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-26 22:46:10 +01:00
Adam Warner
1daeb117cb Merge pull request #1183 from pi-hole/master
sync: master to dev
2022-08-26 22:45:52 +01:00
Adam Warner
9039a73272 Merge pull request #1182 from pi-hole/dev
Dev -> Master
2022-08-26 00:23:17 +01:00
Adam Warner
cbd86caa5b Merge pull request #1170 from pi-hole/dependabot/pip/urllib3-1.26.5
Bump urllib3 from 1.25.9 to 1.26.5
2022-08-25 21:50:26 +01:00
Adam Warner
471e0425c6 Merge pull request #1181 from pi-hole/fix-podman-issues
Fix issues with Podman and S6 overlay
2022-08-25 21:50:09 +01:00
Adam Warner
8619de0031 Revert change that removed the moving of /init to /s6-init. Add comments to make sure it does not get removed again
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-25 19:31:21 +01:00
Adam Warner
a7c7be01c1 Merge pull request #1180 from pi-hole/master
sync: master to dev
2022-08-25 16:13:51 +01:00
Adam Warner
4241e50d4f Merge pull request #1179 from pi-hole/dev
Dev -> Master
2022-08-25 13:41:39 +01:00
Adam Warner
6baa4f9f08 Merge pull request #1178 from pi-hole/master
sync: master to dev
2022-08-25 13:40:09 +01:00
Adam Warner
c89a55c72e Update dependabot.yml
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-24 21:41:56 +01:00
Adam Warner
776bac7b90 [Experimental] Move the capability setting back to bash_functions from the pihole-FTL service
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-24 21:27:38 +01:00
Adam Warner
7ac0e8f0e3 Merge pull request #1173 from pi-hole/update-docs
FTLCONF_REPLY_ADDR4/6 are now deprecated. Use FTLCONF_LOCAL_IPV4/6 instead
2022-08-23 19:02:28 +01:00
Adam Warner
a1f9601c89 Merge branch 'dev' into update-docs 2022-08-22 21:46:12 +01:00
Adam Warner
cb38190b50 FTLCONF_REPLY_ADDR4/6 are now deprecated. Use FTLCONF_LOCAL_IPV4/6 instead
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-22 21:42:29 +01:00
Adam Warner
8273649b5e Merge pull request #1172 from pi-hole/master
sync: master to dev
2022-08-22 17:25:26 +01:00
Adam Warner
72634fcbc2 Merge branch 'dev' into master 2022-08-22 17:22:32 +01:00
Adam Warner
f2a84ce3dc Remove the stuff that only runs workflows when certain files are changed - it's not working as nice as it could
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-22 17:20:00 +01:00
Adam Warner
66aeeb8542 Merge pull request #1154 from pi-hole/master
sync: master to dev
2022-08-21 20:43:43 +01:00
Adam Warner
f2d42a5b40 No need for this shim 2022-08-21 20:42:42 +01:00
dependabot[bot]
33966f8eb2 Bump urllib3 from 1.25.9 to 1.26.5
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.9 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.9...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-21 19:32:22 +00:00
Adam Warner
62ca934d07 Merge pull request #1169 from pi-hole/dev
Dev -> Master
2022-08-21 20:31:57 +01:00
Frédérick Morin
31cd4fbc47 Add systemd-resolved note for Fedora
Fedora 33+ enables [systemd-resolved by default](https://fedoraproject.org/wiki/Changes/systemd-resolved), so the "Installing on Ubuntu" section becomes relevant for Fedora users as well.

This small change makes it possible to search the Readme for "Fedora" and find the solution instantly.

Signed-off-by: Frédérick Morin <freddydumont@users.noreply.github.com>
2022-08-15 16:46:25 -04:00
Adam Warner
cbe61e0b44 Use dorny/paths-filter instead of the built-in path exclude. This allows us to skip "required" jobs set in branch protection rules 2022-08-01 18:37:17 +01:00
Adam Warner
b7a1e924ed Merge pull request #1161 from zimmertr/fix_readme_syntax
Add missing backticks to Experimental Variables section on README for consistent markdown
2022-08-01 10:19:28 +01:00
TJ Zimmerman
40224be544 Add missing backticks to Exp. Vars for formatting. 2022-08-01 00:10:51 -07:00
Adam Warner
4acba89c3e Merge pull request #1158 from pi-hole/dontbuildreadme
Don't run full test and build when only the README file is changed
2022-08-01 08:08:45 +01:00
Adam Warner
0f3f8fb571 Don't run full test and build for changes to the README file (in theory!) 2022-08-01 08:00:55 +01:00
Adam Warner
4f5330f8f0 Temporary commit to (potentially!) fix failing nightly builds 2022-07-24 00:09:23 +01:00
Adam Warner
08837c5dcb Merge pull request #1152 from pi-hole/oneshot-timeouts
Run `_gravityonboot` oneshot in background
2022-07-21 19:52:04 +01:00
Adam Warner
6830b99e4a Start gravityonboot.sh as a background task to prevent timeouts 2022-07-21 19:46:02 +01:00
Adam Warner
b9df80b1ee Change of naming convention for oneshots 2022-07-21 19:45:30 +01:00
Adam Warner
1970ffd97d Merge pull request #1148 from pi-hole/fix/webpassword-env
Fix environment variable regression caused by refactor
2022-07-21 17:27:37 +01:00
Adam Warner
4fe91be9c9 Merge pull request #1151 from Antiz96/dev
Update docker_run.sh
2022-07-21 13:18:14 +01:00
Robin Candau
fc99c98f30 Update docker_run.sh
Signed-off-by: Robin Candau <53110319+Antiz96@users.noreply.github.com>
2022-07-21 13:58:23 +02:00
Adam Warner
e75e3800a2 make sure that setup_FTL_ProcessDNSSettings is the last thing called, else user set environment variables will be overridden when it sources setupVars.conf
Some additional tweaks
2022-07-19 18:22:49 +01:00
Adam Warner
970c45c950 Merge pull request #1147 from pi-hole/massive-refactor
Reorganise Repository to make things easier to follow
2022-07-15 18:07:23 +01:00
Adam Warner
e7e9004ac2 Merge branch 'dev' into massive-refactor 2022-07-15 18:04:14 +01:00
Adam Warner
2c963a0f01 update example paths in readme 2022-07-15 17:46:33 +01:00
Adam Warner
1d59f257ff Reorganise the repository
Simplify the test suite now that we use buildx to build the final image
Remove tests that were never run/skipped in previous runs (same number of tests passing as were before)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-15 17:43:09 +01:00
Adam Warner
318720fab9 Merge pull request #1141 from pi-hole/massive-refactor
Huge tidy up/prune/refactor of the code
2022-07-15 17:13:01 +01:00
Adam Warner
74dec72bbb Update s6/debian-root/etc/s6-overlay/s6-rc.d/1-startup/up
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>

Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2022-07-15 16:28:16 +01:00
Adam Warner
eb5c86ed3e Try i686 version of s6 overlay for i386 container?
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-14 18:37:00 +01:00
Adam Warner
d6dde5a1fd shellcheck
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-12 16:44:11 +01:00
Adam Warner
13c45454dd finish service script wrapper
Build this branch on push?

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-12 16:40:04 +01:00
Adam Warner
c82c33b5a3 Merge pull request #1142 from pi-hole/s6-3-markII
Upgrade to S6 overlay v3
2022-07-12 16:31:06 +01:00
Adam Warner
6edd1fd494 Move the functionality of fix_capabilties into the pihole_FTL run script. Prevents issues when checking out a new branch of pihole-FTL inside the container
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-12 16:29:44 +01:00
Adam Warner
84a497038d Source webpage.sh anyway - in the end I don't think we will be able to get away from this without a dedicated function in the core repo (or copying the code - but I wont do that)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-12 15:48:12 +01:00
Adam Warner
49062e17f1 Bump to S6 overlay v3 - and the changes that go with that...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-12 15:18:33 +01:00
Adam Warner
7863fe5016 spell-check
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-11 23:59:12 +01:00
Adam Warner
611df9b3f0 Huge tidy up/prune/refactor of the code
- Moves most code in start.sh into functions in bash_functions.sh
- Removes code from 20-start.sh and moves it inside start.sh
- Removes unused variables and code, making it easier to find our way around
- Removes dependency on webpage.sh, which had to be modified in order to source it properly (thus breaking pihole checkout), use utils.sh instead
- Replaces all uses of ServerIP/v6 with new FTLCONF_REPLY_ADDR4/6 variables
- No need to symlink echo to whiptail any more (probably hasn't been needed for a while)
- removes huge list of exported env vars at the top of start.sh - no longer appear to be needed
- rename some functions in bash_functions to more logical names, group their usages in start.sh
- adjust/fix tests to match changes
- remove some dead tests

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-11 23:50:05 +01:00
Adam Warner
7e817b9360 Merge pull request #1140 from pi-hole/etc-pihole-files
Ensure creation of all needed Pi-hole files in /etc/pihole on container startup
2022-07-11 12:50:20 +01:00
Adam Warner
2ebefaab12 Instead of downloading macvendor.db only when it does not exist, move the initially installed version to root and symlink to it to ensure it is always up to date.
Run installLogRotate from basic-install.sh to include the logrotate config in /etc/pihole (base image now includes logrotate)
2022-07-11 12:46:07 +01:00
Adam Warner
970bc62836 Merge pull request #1138 from pi-hole/macvendor-mounted-volume
download macvendor.db on container start if it is missing
2022-07-10 17:11:09 +01:00
Adam Warner
e13586aa1e download macvendor.db on container start if it is missing from /etc/pihole (can happen in the case of a volume mount)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-10 16:54:22 +01:00
Adam Warner
64c31b8374 Merge pull request #1136 from pi-hole/master
sync: master to dev
2022-07-10 14:32:59 +01:00
Adam Warner
7e69551be1 Merge pull request #1135 from pi-hole/dev
Dev
2022-07-10 14:00:27 +01:00
Adam Warner
8a294e875f Merge pull request #1130 from yubiuser/skip_install
Rename PH_TEST to SKIP_INSTALL
2022-07-10 13:53:32 +01:00
Adam Warner
faf8e29751 Merge pull request #1133 from casperklein/dev
Silent capsh error output
2022-07-09 17:45:56 +01:00
Adam Warner
39021c66f9 Merge branch 'dev' into dev 2022-07-09 17:39:25 +01:00
Adam Warner
a957aba602 Merge pull request #1132 from pi-hole/master
sync: master to dev
2022-07-09 17:38:54 +01:00
Casper
50efb1f50c Silent capsh error output
Signed-off-by: Casper <casperklein@users.noreply.github.com>
2022-07-09 01:59:22 +02:00
Adam Warner
c784963b83 Build process complaining about atomicwrites version, up to 1.4.1 and regenerate lock file (Do I sound like I know what I'm talking about...?)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-08 22:08:05 +01:00
Adam Warner
2f0fc391c4 Merge pull request #1131 from pi-hole/dev
Dev -> master before tagging
2022-07-08 19:19:24 +01:00
Adam Warner
0ec6f866cd Merge pull request #1115 from pi-hole/var-log-pihole
Account for renaming/moving of log files in main repos
2022-07-08 17:33:07 +01:00
Adam Warner
33bae3207f Also account for renaming of pihole-FTL.log -> FTL.log
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-08 17:25:29 +01:00
Christian König
9fd7719638 Rename PH_TEST to SKIP_INSTALL
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-07-06 22:40:10 +02:00
Adam Warner
b86db0fc3f Merge branch 'dev' into var-log-pihole 2022-07-06 18:37:19 +01:00
Adam Warner
795af5f87a Merge pull request #1127 from yubiuser/fix/stale_reason
Fix close-issue-reason
2022-07-06 18:27:29 +01:00
Adam Warner
d0b6c21f8f Merge pull request #1128 from PeterDaveHelloKitchen/update-python-dependency
Update Python dependency - `urllib3` & `requests`
2022-07-06 18:22:12 +01:00
Peter Dave Hello
8153363b2d Update Python dependency - urllib3 & requests
- Update urllib3 from v1.25.9 to v1.26.5
- Update requests from v2.22.0 to v2.28.1

There's a medium severity CVE in urllib3, before v1.26.5, but we can't
only just update urllib3 because there will be a dependency conflict.
requests also needs to be updated.

CVE reference:

https://www.cve.org/CVERecord?id=CVE-2021-33503

> An issue was discovered in urllib3 before 1.26.5. When provided with a
> URL containing many @ characters in the authority component, the
> authority regular expression exhibits catastrophic backtracking,
> causing a denial of service if a URL were passed as a parameter or
> redirected to via an HTTP redirect.

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
2022-07-06 01:50:48 +08:00
Christian König
8fae8a1fdc Fix close-issue-reason
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-07-05 10:24:37 +02:00
Adam Warner
d038a96f5c Merge branch 'dev' into var-log-pihole 2022-07-04 15:40:58 +01:00
Adam Warner
855086caa7 Update s6/debian-root/etc/services.d/pihole-FTL/run
Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2022-07-04 15:40:53 +01:00
Adam Warner
c3a4a832dd Merge pull request #1126 from yubiuser/less_stale
Run stale workflow only once a day at 08:00
2022-07-04 15:39:36 +01:00
Christian König
aacc3efc93 Run stale workflow only once a day at 08:00
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-07-04 16:03:16 +02:00
Adam Warner
543adf1f64 Merge branch 'dev' into var-log-pihole 2022-07-03 19:29:39 +01:00
Adam Warner
b1c2555528 Merge pull request #1123 from PeterDaveHelloKitchen/update-python-dependency
Update Python dependency - urllib3 from v1.25.8 to v1.25.9
2022-07-03 19:28:59 +01:00
Adam Warner
afdb7a110d Merge pull request #1125 from pi-hole/master
sync: master to dev
2022-07-03 19:28:36 +01:00
Adam Warner
4e6bc66ce5 Merge pull request #1124 from pi-hole/meta/readme_support_update
Update README.md
2022-07-02 10:11:51 +01:00
Dan Schaper
bb99fae517 Update README.md
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-07-01 13:05:11 -07:00
Peter Dave Hello
a6d0e49ed1 Update Python dependency - urllib3 from v1.25.8 to v1.25.9
https://www.cve.org/CVERecord?id=CVE-2020-26137

> urllib3 before 1.25.9 allows CRLF injection if the attacker controls
> the HTTP request method, as demonstrated by inserting CR and LF
> control characters in the first argument of putrequest(). NOTE: this
> is similar to CVE-2020-26116.

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
2022-06-30 18:44:31 +08:00
Adam Warner
4399f41473 Merge pull request #1122 from pi-hole/master
sync: master to dev
2022-06-24 09:18:16 +01:00
Adam Warner
dba2235c8d Merge pull request #1121 from yubiuser/stale-issue-reason
Add stale-issue-reson: not_planned
2022-06-24 09:14:07 +01:00
Christian König
b71bec2266 Add stale-issue-reson: not_planned
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-06-24 08:58:11 +02:00
Adam Warner
05bf32abda Update s6/debian-root/etc/services.d/lighttpd/run
Co-authored-by: yubiuser <ckoenig@posteo.de>

Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2022-06-12 17:56:47 +01:00
Adam Warner
f17898bf6f Also account for /var/log/lighttpd file name changes
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-12 13:37:39 +01:00
Adam Warner
1900d567c9 Mop up some other references
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-12 13:10:12 +01:00
Adam Warner
b7016668b4 Account for log files being moved to /var/log/pihole/
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-12 12:59:18 +01:00
Adam Warner
1c369e3dea Merge pull request #1111 from pi-hole/address-sonarr-complaints
Address Sonar complaints
2022-06-12 12:06:35 +01:00
Adam Warner
96332db038 Merge pull request #1112 from mmvanheusden/patch-1
Remove a tab in the readme (typo)
2022-06-07 15:37:22 +01:00
mmvanheusden
60e252c414 Remove random tab in the readme 2022-06-07 16:06:15 +02:00
Adam Warner
cb16942096 Address Sonar rules S125 (https://rules.sonarsource.com/python/RSPEC-125) and S1481 (https://rules.sonarsource.com/python/RSPEC-1481)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 22:04:44 +01:00
Adam Warner
29f81fcfbc Address Sonar rule S1192 (https://rules.sonarsource.com/python/RSPEC-1192)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 21:58:09 +01:00
Adam Warner
b3717000ae Address Sonar rules S117 (https://rules.sonarsource.com/python/RSPEC-117) and S1542(https://rules.sonarsource.com/python/RSPEC-1542) in all test .py files
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 21:26:47 +01:00
Adam Warner
5b0ea12766 Merge pull request #1106 from pi-hole/use_env_webpassword
Always use WEBPASSWORD env var if set
2022-06-06 20:43:23 +01:00
Adam Warner
64e449c133 fix [this code smell](https://sonarcloud.io/project/issues?pullRequest=1106&issues=AYE6byrIbM3H9G6ifn9K&open=AYE6byrIbM3H9G6ifn9K&id=pi-hole_docker-pi-hole)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 20:26:26 +01:00
Adam Warner
6b9a4e6216 Fix up tests to work with new logic
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 20:14:26 +01:00
RD WebDesign
67fc925153 Using the same format for the new message
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-05-30 17:31:57 -03:00
RD WebDesign
f9d990145a Always use WEBPASSWORD env var if set
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-05-30 03:00:16 -03:00
Adam Warner
9f9010edaa Merge pull request #1104 from pi-hole/master
sync: master to dev
2022-05-24 22:27:41 +01:00
Adam Warner
20e51e77da Update sync-back-to-dev.yml 2022-05-24 22:26:29 +01:00
Adam Warner
1570a7682e Merge pull request #1102 from pi-hole/dev
Merge Dev->master for new tag
2022-05-23 17:18:02 +01:00
Adam Warner
8cedb5b030 Merge pull request #1082 from canepan/patch-2
Update README.md to mention minimum required docker version
2022-05-23 17:16:54 +01:00
Adam Warner
0e7013e890 Update README.md 2022-05-23 17:15:47 +01:00
Adam Warner
c7d1fe5e82 Merge pull request #1088 from pi-hole/dependabot/github_actions/docker/build-push-action-3
Bump docker/build-push-action from 2 to 3
2022-05-23 17:11:09 +01:00
Adam Warner
bd3a69e056 Merge pull request #1089 from pi-hole/dependabot/github_actions/docker/metadata-action-4
Bump docker/metadata-action from 3 to 4
2022-05-23 17:10:58 +01:00
Adam Warner
6d894a3f34 Merge pull request #1090 from pi-hole/dependabot/github_actions/docker/setup-buildx-action-2
Bump docker/setup-buildx-action from 1 to 2
2022-05-23 17:10:15 +01:00
Adam Warner
f246384bb3 Merge pull request #1091 from pi-hole/dependabot/github_actions/docker/login-action-2
Bump docker/login-action from 1 to 2
2022-05-23 17:09:26 +01:00
Adam Warner
62c1fee49a Merge pull request #1092 from pi-hole/dependabot/github_actions/docker/setup-qemu-action-2
Bump docker/setup-qemu-action from 1 to 2
2022-05-23 17:08:55 +01:00
Adam Warner
33baaa4bb0 Merge pull request #1101 from pi-hole/allow-checkout
Allow pihole checkout on any image rather than just dev/nightly image…
2022-05-23 17:07:51 +01:00
Adam Warner
6037832d5d Allow pihole checkout on any image rather than just dev/nightly images - sometimes it is useful to troubleshoot
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-05-23 16:59:50 +01:00
dependabot[bot]
725711c9aa Bump docker/setup-qemu-action from 1 to 2
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 06:14:49 +00:00
dependabot[bot]
820c4818e9 Bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 06:14:46 +00:00
dependabot[bot]
287c45a624 Bump docker/setup-buildx-action from 1 to 2
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 06:14:43 +00:00
dependabot[bot]
ab6bdd7e77 Bump docker/metadata-action from 3 to 4
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 06:14:40 +00:00
dependabot[bot]
f7c4053179 Bump docker/build-push-action from 2 to 3
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 06:14:38 +00:00
Adam Warner
d083079b17 Merge pull request #1086 from klutchell/kyle/fix-capabilities
Fix capability detection for privileged containers
2022-05-06 20:11:14 +01:00
Kyle Harding
6d3ab13a4d Check each cap explicitly against the permitted vector
Privileged containers do not list each cap by name,
instead they lead with =eip and selectively remove
caps with cap_foo_bar-eip.

Instead we can use the --has-p flag of capsh to check
for the permitted cap.

Signed-off-by: Kyle Harding <kyle@balena.io>
2022-05-05 11:13:42 -04:00
Adam Warner
ad9d7cb710 Merge pull request #1084 from lightswitch05/feature/update-default-debian-to-bullseye
Update default debian to bullseye. Update README to describe docker tags.
2022-05-04 18:20:26 +01:00
Adam Warner
2079c6adce Merge pull request #1083 from lightswitch05/bugfix/minor-corrections-per-sonarcloud
Minor corrections per sonarcloud
2022-05-04 18:15:43 +01:00
Daniel
6e36311d6f Update README.md to describe the current docker tagging pattern 2022-05-02 22:49:08 -04:00
Daniel
08627a1ba7 Update everything to use bullseye as the default debian version 2022-05-02 22:36:59 -04:00
Daniel
f1c5662265 Minor bugfixes per SonarCloud results 2022-05-02 21:44:33 -04:00
canepan
3d27c94595 Update README.md
Signed-off-by: Nicola Canepa <nicola.canepa.74@gmail.com>
Mention the required update to docker.io in additon to libseccomp2 on ARM
2022-05-02 06:20:30 +01:00
Adam Warner
c4542d651d Merge pull request #1079 from pi-hole/master
sync: master to dev
2022-04-25 17:44:52 +01:00
Adam Warner
c4b105853c Merge branch 'dev' 2022-04-25 17:44:19 +01:00
Adam Warner
84766ff1cb Merge pull request #1080 from pi-hole/tweakreadme
Expand on information in Readme about libseccomp
2022-04-25 17:43:41 +01:00
Adam Warner
89480b1e9d Expand on information about libseccomp
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-25 17:42:35 +01:00
Adam Warner
99b43a8795 Merge pull request #1076 from pi-hole/codespell
Implement codespell action
2022-04-22 17:53:02 +01:00
Adam Warner
e1dc289d7d Fix suggested spelling mistakes
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-22 17:41:29 +01:00
Adam Warner
59b3ae999f Add codespell
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-22 17:37:57 +01:00
Adam Warner
ebbbdae2df Merge pull request #1074 from pi-hole/dev
2022.04.3
2022-04-20 21:07:44 +01:00
Adam Warner
93e7daddc1 Merge pull request #1006 from PeterDaveHelloKitchen/Improve-Dockerfile_build
Improve/Refactor Dockerfile_build
2022-04-20 20:49:13 +01:00
Adam Warner
2afb0fc703 Merge pull request #1071 from vterron/patch-1
Fix typo
2022-04-18 15:42:46 +01:00
Víctor Terrón
a88124acdd Fix typo
Signed-off-by: Víctor Terrón <quintanar@gmail.com>
2022-04-18 15:46:27 +02:00
Adam Warner
f6d6a31743 Merge pull request #1060 from pi-hole/master
sync: master to dev
2022-04-12 17:29:34 +01:00
Adam Warner
f3260fb0f9 Update README.md 2022-04-12 17:28:10 +01:00
Adam Warner
4b9e142d54 Update README.md 2022-04-12 17:26:55 +01:00
Adam Warner
fedf69beeb Merge pull request #1067 from pi-hole/dev-image-tools
If building `dev` or `nightly`, add some additional tools via apt
2022-04-11 22:37:57 +01:00
Adam Warner
12ded16443 Merge pull request #1066 from pi-hole/tweak-s6-service-wrapper
read pids into an array in case of multiple instances of FTL running.…
2022-04-11 22:31:46 +01:00
Adam Warner
edd67d73c5 Merge pull request #1065 from pi-hole/dependabot/github_actions/actions/stale-5
Bump actions/stale from 4 to 5
2022-04-11 21:25:24 +01:00
Adam Warner
d52eaaa622 If building dev or nightly, add some additional tools via apt to aid debugging
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-11 21:09:02 +01:00
Adam Warner
b0878f1750 read pids into an array in case of multiple instances of FTL running. Wait til they are all closed (stop calls killall) and then start another one
Additionally, move the logic from start() into the end of restart(), and have start() call restart, ensures multiple calls of start cannot start multple processes

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-11 20:59:07 +01:00
dependabot[bot]
bcbbdb7a58 Bump actions/stale from 4 to 5
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 06:10:36 +00:00
Adam Warner
509ca4b39a Merge pull request #1064 from jasper-vandemalle/patch-2
Fix minor typos in README
2022-04-08 12:02:25 +01:00
Jasper Vandemalle
95f0eeea00 Fix minor typos in README 2022-04-08 11:37:11 +02:00
Adam Warner
a4cb3cf0ca Merge pull request #1059 from pi-hole/tweak-upgrade-notes
Add some notes to the readme regarding buster hosts. Additionally add a note about using watchtower to auto-update
2022-04-07 07:18:16 +01:00
Adam Warner
1723f8d5ca Merge branch 'master' into tweak-upgrade-notes 2022-04-05 09:28:38 +01:00
Adam Warner
10c960dd92 Merge pull request #1013 from pi-hole/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-04-04 22:07:52 +01:00
dependabot[bot]
4fa8bbe04c Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 20:46:18 +00:00
Adam Warner
1630116ecb Merge pull request #1058 from pi-hole/touch-install
Replace one more instance of `touch` with `install /dev/null`
2022-04-04 21:45:19 +01:00
Adam Warner
c1ea9dac8c Update README.md 2022-04-04 21:01:09 +01:00
Adam Warner
709210291d Merge pull request #1057 from pi-hole/quiet-ftl-outpt
Silence FTL output on container run (for now) (again!)
2022-04-04 20:59:23 +01:00
Adam Warner
51cffa7e56 Update bash_functions.sh
Co-authored-by: yubiuser <ckoenig@posteo.de>
2022-04-04 20:59:07 +01:00
Adam Warner
f6947f1497 Add some additonal upgrade notes to the readme, and a note on using watchtower
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-04 18:58:32 +01:00
Adam Warner
18e2e11541 Silence FTL output on container run (for now) (again!)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-04 18:07:08 +01:00
Adam Warner
0db0df5231 change one more touch command to install /dev/null to prevent issues on fresh volumes (and for consistency with other usages)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-04 18:06:25 +01:00
Adam Warner
a84ede1a5f Merge pull request #1056 from pi-hole/master
sync: master to dev
2022-04-04 16:41:59 +01:00
Adam Warner
5bae002db3 Update README.md 2022-04-04 15:15:46 +01:00
Dan Schaper
cc079aa198 Merge pull request #1050 from pi-hole/dev
Dev
2022-04-02 12:32:11 -07:00
Dan Schaper
60241e3f9a Merge pull request #1051 from pi-hole/fix/capsh_call
Allow caps detection out of order.
2022-04-02 12:25:14 -07:00
Dan Schaper
ce75910d28 Allow caps detection out of order.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-04-02 12:24:02 -07:00
Dan Schaper
b76ffa4e67 Merge pull request #1049 from pi-hole/fix/capsh_call
Apply detected capabilities and disable DHCP if not capable.
2022-04-02 12:10:04 -07:00
Dan Schaper
6b9abc23a0 Apply capabilities to pihole-FTL and notify DHCP wihtout NET_ADMIN.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-04-02 11:58:42 -07:00
Adam Warner
279b206cdd Merge pull request #1044 from ozeliurs-MaximeBilly/patch-1
your error
2022-04-02 13:26:19 +01:00
BoLLYde Maxime
321b89e1a6 your error
Small error :)
2022-04-02 14:25:20 +02:00
Adam Warner
e510bb7588 Update readme to remove note about 2022.04, and instead include new details about upcoming 2022.04.01
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-02 11:58:12 +01:00
Adam Warner
70bad9f08f Extend conditional cap setting to all caps before attempting to set them
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-02 11:08:20 +01:00
Adam Warner
5df71380b7 Merge pull request #1041 from pi-hole/only-set-caps-if-we-can
Only set capabilities on pihole-FTL binary if they are available to the container
2022-04-02 10:55:32 +01:00
Adam Warner
4dc9504330 evert pihole-FTL service command to use s6-setuidgid command when running pihole-FTL
Update fix_capabilities to only apply net_admin and sys_nice if they are actually available to the container

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-02 10:50:55 +01:00
Adam Warner
658658ebc9 Merge pull request #1038 from pi-hole/master
sync: master to dev
2022-04-02 09:46:27 +01:00
Adam Warner
91432ada4d Move upgrade notes to the very top of the README
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-02 09:38:24 +01:00
Adam Warner
f1a4bb8584 Include note about capabilities on 2022.04 2022-04-02 09:27:33 +01:00
Adam Warner
af0af5a59a Supress FTL log output (for now)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-01 23:31:00 +01:00
Adam Warner
7a1546c001 Merge pull request #1032 from SuperSandro2000/patch-1
Document FTL_CMD environment variable
2022-04-01 23:19:22 +01:00
Adam Warner
2ec62a3e9b Merge pull request #1034 from pi-hole/fix/touch_guard
Remove touch from runtime init scripts
2022-04-01 23:17:50 +01:00
Dan Schaper
54f56a717e Remove touch from runtime init scripts
co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-04-01 11:45:16 -07:00
Adam Warner
5d8fd599bf Merge pull request #1033 from pi-hole/fix/touch_guard
Add touch guards for Buster hosts and Bullseye images.
2022-04-01 18:19:51 +01:00
Dan Schaper
ecb0a8c87b Merge branch 'touch_only_if_needed' into fix/touch_guard 2022-03-31 12:46:34 -07:00
Dan Schaper
72b1c8679c Add if/then guards to touch calls for Buster.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-03-31 11:49:35 -07:00
RD WebDesign
3cb043eb10 Use touch only if we need to create an absent file
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-03-31 15:00:47 -03:00
Sandro
c31599c403 Document FTL_CMD env
Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
2022-03-29 23:36:47 +02:00
Adam Warner
41c1596915 Merge pull request #1030 from pi-hole/fix/new_docker
Docker 20.10.14 binary capabilites update.
2022-03-29 18:59:05 +01:00
Dan Schaper
f8cc0878e1 Merge branch 'fix/new_docker' of https://github.com/pi-hole/docker-pi-hole into fix/new_docker 2022-03-28 18:40:07 -07:00
Dan Schaper
a485e238ca call capsh directly, no need to set uid/gid
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-03-28 18:37:03 -07:00
Dan Schaper
ca315e4ee9 Remove 'nice' in the docker environment
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-03-28 17:25:43 -07:00
Dan Schaper
cf06b7ead3 Allow caps inheritance for raising to ambient.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-03-28 16:48:46 -07:00
Dan Schaper
086dd6cc86 Bullseye based capsh
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2022-03-28 14:37:13 -07:00
Adam Warner
946dc195e8 Merge pull request #1029 from pi-hole/bullseye-time
Upgrade to Bullseye base image instead of buster
2022-03-28 22:36:52 +01:00
Adam Warner
ee20e52d75 use bullseye base image
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-03-28 22:15:49 +01:00
Adam Warner
b5e656491e Merge pull request #1028 from pi-hole/revert-1009-dev_origin
Revert "Dev origin: enable lighttpd-mod-ssl in lighttpd when based on debian:bullseye"
2022-03-28 22:05:38 +01:00
Adam Warner
099f81b2d2 Revert "Dev origin: enable lighttpd-mod-ssl in lighttpd when based on debian:bullseye" 2022-03-28 22:05:28 +01:00
Adam Warner
99dc2e0952 Merge pull request #1009 from edgd1er/dev_origin
Dev origin: enable lighttpd-mod-ssl in lighttpd when based on debian:bullseye
2022-03-28 21:12:58 +01:00
Dan Schaper
2bfc7f57de Merge pull request #1023 from pi-hole/dschaper-patch-1
See Mattermost for discussion.
2022-03-24 14:44:36 -07:00
Dan Schaper
1221d91685 Whistles.... 2022-03-24 14:40:25 -07:00
Dan Schaper
06232c767e See Mattermost for discussion.
Trying again with DAC override.
2022-03-24 14:35:12 -07:00
edgd1er
442d181925 Enable lighttpd-mod-ssl on bullseye
Signed-off-by: edgd1er <edgd1er@hotmail.com>
2022-03-24 21:42:46 +01:00
Adam Warner
109879ae6c Merge pull request #1022 from pi-hole/dschaper-patch-1
Test fix for moby security update.
2022-03-24 19:51:47 +00:00
Dan Schaper
3aee0e1eaf Test fix for moby security update.
Change the permissions to `permitted` instead of `inherited`.

See https://github.com/moby/moby/issues/43420#issuecomment-1077870013
2022-03-24 12:48:24 -07:00
Adam Warner
d46a1e3356 Merge pull request #1014 from haxwithaxe/support-docker-links-for-PIHOLE_DNS_dev
Support docker service names and links for PIHOLE_DNS_
2022-03-16 15:30:43 +00:00
haxwithaxe
fb112ce1bf Handles docker service names with and without ports.
Signed-off-by: haxwithaxe <spam@haxwithaxe.net>
2022-03-14 18:20:19 -04:00
haxwithaxe
06569a5bcd Handles docker service names with ports.
Signed-off-by: haxwithaxe <spam@haxwithaxe.net>
2022-03-14 18:02:41 -04:00
haxwithaxe
1c24b96048 Fixed references to IP(s) to entry/entries in PIHOLE_DNS_ parsing block of start.sh.
Signed-off-by: haxwithaxe <spam@haxwithaxe.net>
2022-03-13 22:46:21 -04:00
haxwithaxe
e4a1abb5fb Added docker service name info to PIHOLE_DNS_ section.
Signed-off-by: haxwithaxe <spam@haxwithaxe.net>
2022-03-13 22:40:56 -04:00
haxwithaxe
ae5a5afdc5 Added support for docker links (domain names) as DNS servers.
Signed-off-by: haxwithaxe <spam@haxwithaxe.net>
2022-03-13 22:40:56 -04:00
Peter Dave Hello
0897c1e418 Prevent leaving pip cache in Dockerfile_build
Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
2022-02-20 23:07:19 +08:00
Peter Dave Hello
c8179fa62c Clean up apt cache in Dockerfile_build
Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
2022-02-20 23:07:17 +08:00
Adam Warner
e6cde29cc1 Merge pull request #1005 from PeterDaveHelloKitchen/fix-README.md
Fix typo in README.md "Optional Variables" (IPv6)
2022-02-19 15:54:03 +00:00
Peter Dave Hello
e459169d8a Fix typo in README.md "Optional Variables" (IPv6) 2022-02-16 17:13:39 +08:00
Adam Warner
1b35e7fdd4 Merge pull request #1003 from pi-hole/revert-to-buster
Revert base image to buster, we can try bullseye again later, there are a couple of teething issues
2022-02-12 22:56:27 +00:00
Adam Warner
90f4ebe882 revert base image to buster, we can try bullseye again later
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-02-12 22:48:58 +00:00
Adam Warner
6b5f746a15 Merge pull request #999 from pi-hole/master
sync: master to dev
2022-02-12 12:30:12 +00:00
Adam Warner
2a705ecfe9 Add investigating label to ignore list 2022-02-12 11:18:34 +00:00
Adam Warner
5b41b63fa0 Merge pull request #997 from rdwebdesign/alert_branch
Adding text message asking to select "dev" branch on new PR
2022-02-08 15:15:08 +00:00
Adam Warner
0a7427371e Merge pull request #996 from rdwebdesign/add_TZ_env
Adding `TZ` var to PHP environment
2022-02-08 15:14:03 +00:00
RD WebDesign
5efcd88b20 Text message asking to select "dev" branch on new PR
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-02-07 16:47:59 -03:00
RD WebDesign
fd0b9bf9d3 Adding TZ var to PHP environment
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-02-06 17:38:15 -03:00
Adam Warner
a42f67f5ee Merge pull request #994 from sebastiansterk/patch-1
make prerequisites more precise
2022-02-04 21:29:47 +00:00
Adam Warner
89b03445a1 Merge pull request #992 from pi-hole/master
sync: master to dev
2022-02-04 21:28:37 +00:00
Adam Warner
13c81a9091 Merge pull request #990 from edgd1er/dev_origin
[Experimental] Add ability to Redirect lighttpd logs to stdout
2022-02-04 19:40:32 +00:00
Sebastian Sterk
3d6f53899f make prerequisites more precise 2022-02-01 00:17:59 +01:00
Adam Warner
69d4349bbb Create dco.yml 2022-01-28 10:19:44 +00:00
Adam Warner
1d51da7f47 Create release.yml 2022-01-28 10:18:50 +00:00
Adam Warner
351b9a7f85 Create sync-back-to-dev.yml
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-28 10:18:16 +00:00
Adam Warner
19bb9dcc2f use label stale on stale issues instead of Submitter attention required, which doesn't always make sense
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-28 10:15:49 +00:00
edgd1er
2db09515d7 add suggested changes to send logs to stdout
Signed-off-by: edgd1er <edgd1er@hotmail.com>
2022-01-28 08:12:40 +01:00
edgd1er
06d6b74c63 add finish scripts for logs. prevent duplicate cat processes, lighttpd start loop
Signed-off-by: edgd1er <edgd1er@hotmail.com>
2022-01-27 05:49:59 +01:00
edgd1er
140312b79c Redirect lighttpd logs to stdout
Signed-off-by: edgd1er <edgd1er@hotmail.com>
2022-01-27 04:17:42 +01:00
Adam Warner
e6dd028c61 switch from -wU to -wu, as there is nothing set up to notify that the daemon's are ready - effectively supresses a warning message that we don't need to pay attention to
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-26 21:41:17 +00:00
Adam Warner
1f3951431b tweak per https://github.com/pi-hole/docker-pi-hole/pull/991#pullrequestreview-864021964 2022-01-26 21:06:17 +00:00
Adam Warner
a29faad9df Merge pull request #991 from pi-hole/tweak/lighttpd-run
Touch/chown lighttpd access/error logs on service start
2022-01-26 18:30:49 +00:00
Adam Warner
2eb9afc350 Touch/chown lighttpd access/error logs on service start. May not be 100% neccasery currently, but could be useful
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-26 18:29:14 +00:00
Adam Warner
25539a9c99 Merge pull request #982 from edgd1er/dev_origin
[Experimental] Add ability to change UID / GID for www-data and pihole user.
2022-01-20 17:16:04 +00:00
Adam Warner
778e993903 Move variable description to the Experimental section
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-20 17:12:18 +00:00
Adam Warner
510ca0b873 rechown /opt/pihole and pihole command in case of UID changing
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-20 17:10:19 +00:00
Adam Warner
eed203530e while I'm in here - drop S6 overlay version per https://github.com/just-containers/s6-overlay/issues/329
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-17 23:28:37 +00:00
Adam Warner
fe1676b9ed Move a few things about. Set permissions pihole-FT requires in it's run script. remove pihole-FTL test from test-config because nothing exists until it has started for the first time.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-17 23:28:02 +00:00
Adam Warner
c2870031e3 Merge pull request #987 from PeterDaveHelloKitchen/fix-#986
Use consistent method to kill process in s6 finish script
2022-01-17 22:03:36 +00:00
edgd1er
0ecde45d22 removed vars in compose sample.
Signed-off-by: edgd1er <edgd1er@hotmail.com>
2022-01-17 15:28:25 +01:00
edgd1er
2cec4fa719 change UID / GID for www-data and pihole user.
When mounting volumes, specific rights may be needed to write on mounted volumes on the host.

Signed-off-by: edgd1er <edgd1er@hotmail.com>
2022-01-17 15:28:25 +01:00
Peter Dave Hello
b29ac1ec18 Use consistent method to kill process in s6 finish script
If the process does not exist, the error message of `kill` command is a
little bit confusing:

`kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]`

Using `killall` in `/s6/debian-root/etc/services.d/pihole-FTL/finish` to
kill the process, like what we do in `cron/finish` & `lighttpd/finish`,
will make the usage in this project more consistent, and also, the
command `killall` will provide better & friendly output, like:

`pihole-FTL: no process found`

Close #986, cc #973

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
2022-01-17 22:19:23 +08:00
Adam Warner
0a20ef8955 Merge pull request #988 from pi-hole/master
sync `dev` to `master`
2022-01-17 13:04:28 +00:00
Adam Warner
13a3da65c8 Update stale.yml
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-12 09:17:26 +00:00
Adam Warner
b901a899ae add never-stale and bug labels to exemptions
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-11 19:11:51 +00:00
Adam Warner
9436389095 accidentally a complete path
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-09 21:35:21 +00:00
Adam Warner
6262433f4d Merge pull request #981 from pi-hole/new/PIHOLE_DNS_-source-of-truth
If PIHOLE_DNS_ env var is employed, use that as source of truth
2022-01-09 21:24:10 +00:00
Adam Warner
e0f05ef372 Remove any existing PIHOLE_DNS_ configurations before applying those that have been passed in via env var
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-09 21:05:53 +00:00
Adam Warner
2fb2202a17 Sync the minimal docker-compose examples. Remove note about pihole.log, it isn't neccasery (https://github.com/pi-hole/docker-pi-hole/issues/809)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-09 19:04:19 +00:00
Adam Warner
c6e859723c Merge pull request #978 from pi-hole/fix-2567a9b
Don't attempt to chmod pihole-FTL.db if it does not exist
2022-01-08 17:31:52 +00:00
Adam Warner
69e9272a91 Missed a reference removal in 2567ab9940
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-08 17:30:22 +00:00
Adam Warner
6e9790870c Use stale action from core repo to manage stale issues
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-08 17:18:04 +00:00
Adam Warner
0baf7b63d9 Merge pull request #976 from pi-hole/new/bullseye
Switch base image from Buster to Bullseye
2022-01-08 13:40:45 +00:00
Adam Warner
5e79db52ab This does not appear to be an issue on bullseye - tested with the same command's listed here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923479, but switched out buster for bullseye. Confirmed I was able to repro the buster issue on docker desktop for windows
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-08 13:26:11 +00:00
Adam Warner
0018e46a28 Bullseye anyone?
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-08 12:55:54 +00:00
Adam Warner
25a8e0dcba Merge pull request #970 from AlexanderLieret/patch-webtheme
Update list of available web themes
2022-01-07 23:46:07 +00:00
Adam Warner
74707b576c Merge pull request #973 from pi-hole/tweak/serviceMonkeyPatch
Prevent logspam when restarting FTL (Error from kill command)
2022-01-07 23:20:42 +00:00
Adam Warner
9deb685cc0 When restarting the service - wait until the old proc has been killed before attempting to start it again. Prevents messages about the usuage of kill in the log.
Remove old comment

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-07 23:14:28 +00:00
Alexander Lieret
28892f4533 Update list of available web themes
Signed-off-by: Alexander Lieret <alexander.lieret@fau.de>
2022-01-06 17:16:04 +01:00
Adam Warner
4cc3587084 adjustment to custom interface tests to reflect new default behaviour in https://github.com/pi-hole/pi-hole/pull/4509
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-05 22:47:16 +00:00
Adam Warner
2567ab9940 only chown/chmod pihole-FTL.db if it exists
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-05 21:47:25 +00:00
Adam Warner
6b29503dd0 Tweak fix_capabilites output
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-05 19:37:13 +00:00
Adam Warner
806f734cdc Remove shim now that it is in the core repo https://github.com/pi-hole/pi-hole/pull/4515 (#965)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-04 21:46:18 +00:00
Adam Warner
2c6bc33e8d Increase verbosity of error message when capabilities cannot be set - add note to readme about default DNSMASQ_USER. See #963 for details (#964)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-04 18:50:37 +00:00
Adam Warner
2a7ea09d00 Readme tweaks
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-02 15:54:09 +00:00
Adam Warner
a5eda6844e use kill -15 (TERM) instead of 9 to exit FTL a bit more gracefully and save queries to the database
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-02 14:30:31 +00:00
Adam Warner
44bdfc1438 bump s6 to latest
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-02 14:30:06 +00:00
Adam Warner
0eb1a60d78 Switch default DNSMASQ_USER to pihole from root, and fix permissions on pihole-FTL.db to belong to pihole:pihole
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-02 14:29:54 +00:00
Adam Warner
8ea5f9c8dc Add CAP_SYS_NICE,CAP_CHOWN, and CAP_IPC_LOCK to the fix_capabilities() function
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-02 13:05:05 +00:00
Martin F. Schumann
2dde4a64c9 replace php env configuration lines if they are already present instead of adding them always (#952) (#957)
Signed-off-by: Martin Schumann <mfs@mfs.name>
2021-12-28 22:20:32 +00:00
Adam Warner
3f97e6e4fc Only use branch ref for tag if we're not building via schedule event (namely, don;t also tag "master" when doing nightly)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-12-25 13:38:10 +00:00
Phill
b0a5a0f163 Trailing slashes on volumes fail on newer versions of docker-compose (#949)
* Trailing slashes on volumes fail on newer versions of docker-compose

See [Issue 947](https://github.com/pi-hole/docker-pi-hole/issues/947)
for the background.

This PR proposes removing trailing slashes from all documentation,
examples and scripts.

Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
2021-12-11 13:37:18 +00:00
Adam Warner
523762e47d scream test: removing linux/ppc64le as there are build errors - unsure if anyone is _actually_ using this in any case. I guess we'll find out...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-12-11 00:21:51 +00:00
Adam Warner
7848d06325 Switch base from debian:buster-slim to ghcr.io/pi-hole/docker-pi-hole-base:buster-slim, which is updated weekly and should speed up build times on this end 2021-12-11 00:20:04 +00:00
Adam Warner
54ca7e9ce4 Merge branch 'dev' of github.com:pi-hole/docker-pi-hole into dev 2021-12-10 20:51:51 +00:00
Adam Warner
9a9ee41a45 - Replace PIHOLE_VERSION with PIHOLE_DOCKER_TAG
- reorder some stuff in the main Dockerfile
- Remove the CORE/WEB/FTL_VERSION args/env vars
- tweaks to GHA build script after some hints from @crazy-max
- always checkout dev versions of Pi-hole for nightly build, also make sure we're using dev branch of this repo
- keep pihole checkout enabled for dev and nightly tags

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-12-10 20:51:35 +00:00
Denis Khoshaba
f70a4f4022 Update Dockerfile to use COPY instead of ADD as recommended on https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy (#946)
Signed-off-by: TheDen <deniskhoshaba@gmail.com>

Co-authored-by: Adam Warner <me@adamwarner.co.uk>
2021-12-09 19:30:13 +00:00
Adam Warner
7049b5df03 remove references to porrt 443
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-12-09 17:09:36 +00:00
AlexandreRatte
4aaf0998a3 Customize pihole-FTL.conf with FTLCONF_ prefixed environment variables. (#944)
* Customize pihole-FTL.conf with FTLCONF_ prefixed environment variables.

Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>

* Reintroduced parsing of ServerIP* env vars and amended README for deprecated variables.

Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
2021-11-26 16:58:10 +00:00
Adam Warner
27bdf81665 Combine nightly and main workflows into one. Tested functionality on a fork so this can come straight into dev
use dev images for the dev branch build.
Only disable pihole checkout on released tags - allow it in dev and nightly tags

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-11-17 23:42:49 +00:00
moritzbeck01
ff776c2ba4 [skip ci] Fixed link to reverse proxy (#939)
The example seems to no longer be using jwilder/nginx-proxy but the very similar nginxproxy/nginx-proxy. Additionally the link to the example was broken.
2021-10-31 14:41:55 +00:00
Fernando Fernández
e874dc1f3e Publish images to GHCR alongside DockerHub (#940)
Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
2021-10-31 14:39:56 +00:00
Adam Warner
c0d05f291d Add PIHOLE_VERSION as PIHOLE_DOCKER_TAG in the php environment instead of injecting the version into the admin page's footer (#930)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-23 16:32:14 +01:00
Adam Warner
a39726d183 remove reference to pihole/debian-base, replace with debian:{buster}-slim
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-10-09 18:48:17 +01:00
Adam Warner
5ed8b8ec7b Merge pull request #928 from pi-hole/fix/docker-namespace
* Use the namespace from secrets so others can build too.
* Add DOCKERHUB_NAMESPACE variable.
* Use hub namepace in all actions.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-10-03 22:21:47 +01:00
Dan Schaper
aefeb2bc8d Use hub namepace in all actions.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-10-03 14:15:30 -07:00
Dan Schaper
4782f15123 Add DOCKERHUB_NAMESPACE variable.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-10-03 13:41:31 -07:00
Dan Schaper
73a335533b Use the namespace from secrets so others can build too.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-10-03 10:00:00 -07:00
Adam Warner
d036e0d0c0 Merge branch 'dev' 2021-09-29 22:58:07 +01:00
Adam Warner
3696f6065f Actually not needed as you can already choose to run it against whatever branch.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-16 20:58:35 +01:00
Adam Warner
9740d2b86a Add option to run build against another branch to workflow_dispatch
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-16 20:54:42 +01:00
Adam Warner
1b6318c0d9 Merge branch 'dev'
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-15 18:34:33 +01:00
Adam Warner
c371768800 And ppc64le - It might work, it might not. Someone will tell us if it doesn't.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-15 18:32:38 +01:00
Adam Warner
bc545b6049 Add linux/arm/v6 to platforms:
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-15 18:28:09 +01:00
Adam Warner
3942d9a740 Repalce PIHOLE_TAG with PIHOLE_VERSION, it isn't actually needed after all.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 23:43:59 +01:00
Adam Warner
944bc8eb79 use metadata-action to handle image tag names
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 23:27:06 +01:00
Adam Warner
55a682a94c Use the correct namespace to upload the images...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 22:53:38 +01:00
Adam Warner
7624fc3d56 Reduce Test step to only one arch (amd64/buster)
Migrate build and push step to native github actions using docker buildX - which should _hopefully_ resolve #735
Make some adjustments to Dockerfile/build.yml/install.sh to allow both gh-actions-test.sh to build using the test suite, and github actions native commands to build online

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 22:34:24 +01:00
Adam Warner
9b106e6275 [skip ci] Maybe don't push the individual arch images. Test
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 18:03:53 +01:00
Adam Warner
17453166c2 [skip ci] I read the docs for actions/checkout wrong
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 17:09:47 +01:00
Adam Warner
521bed1c4f No need to build stretch images as well as buster
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 17:03:13 +01:00
Adam Warner
1cc3159518 update workflows to use env vars instead of patching VERSIONS file
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 16:53:17 +01:00
Adam Warner
ca69e29514 Always install lastest released Pi-hole unless otherwise indicated by environment variables CORE_VERSION/WEB_VERSION/FTL_VERSION
This is closer to mimicking the installation of Pi-hole on bare metal, and also shaves about 40MB off of the size of a container not using custom branches.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 16:46:19 +01:00
Adam Warner
b553462c95 Merge pull request #921 from pi-hole/tweak/imageversions
Untangle FTL Version from image building
2021-09-12 15:42:06 +01:00
Adam Warner
155d87f8c1 add a skip directive to test_volume_shell_script, as I can't work out how to fix it just yet...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 14:24:50 +01:00
Adam Warner
6cec6f937f Bring GIT_TAG into the build environment for use as PIHOLE_VERSION in the container.
Remove the `pihole/pihole:` part of the PIHOLE_TAG in the python script (see #920)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 14:16:45 +01:00
Adam Warner
1a7bfdc2ee [skip ci] remove tag trigger, add release trigger
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-11 23:30:26 +01:00
Adam Warner
d84851c7a3 [skip ci] wildcard tags filter?
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-11 23:05:54 +01:00
Adam Warner
f0f96ee1ab [skip ci] Remove nightly beta build
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-11 22:55:56 +01:00
Adam Warner
9a800f7efd Update VERSIONS
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-11 22:28:41 +01:00
Adam Warner
52b21c6ef6 remove a bunch of filters for the branch builds. No sense in building master, and the other patterns are rarely actually used.
Remove the v* filter from tag to support proposed new tag versioning format (no v up the front end)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-11 18:58:46 +01:00
Adam Warner
0cceed3c83 Merge branch 'master' into dev 2021-09-06 22:43:22 +01:00
DL6ER
300fcf0c9e Merge pull request #916 from pi-hole/fix/capabilities
Add CAP_SYS_NICE, CAP_IPC_LOCK, CAP_CHOWN capabilites recommendation
2021-09-06 23:24:24 +02:00
DL6ER
ec3b4609bc Add CAP_SYS_NICE, CAP_IPC_LOCK, CAP_CHOWN capabilites recommendation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-09-06 22:33:09 +02:00
Adam Warner
22ce49a123 Update nightly-build beta-v5.9.yml 2021-09-01 16:47:17 +01:00
Adam Warner
d821dcb2f0 Merge pull request #899 from majabojarska/fix_readme_typos
Fix README.md typos: "Descrption"
2021-08-26 09:33:43 +01:00
Adam Warner
ef54216986 Merge pull request #897 from pi-hole/feature/dependabot-actions
Dependabot manage GHA versions.
2021-08-26 09:32:38 +01:00
Dan Schaper
93092da023 Merge branch 'master' into feature/dependabot-actions 2021-08-25 14:22:58 -07:00
Adam Warner
3153346ec8 Merge pull request #905 from shaderecker/dev
Improve Docker Healthcheck: Shorten dig output
2021-08-22 22:45:41 +01:00
Sebastian Haderecker
ee6e1b36a9 Healthcheck: Shorten dig output
Signed-off-by: Sebastian Haderecker <sebastian.haderecker@gmail.com>
2021-08-22 22:04:36 +02:00
Adam Warner
73ad23b3b6 Merge branch 'dev' 2021-08-21 13:48:32 +01:00
Adam Warner
8700afa74d Add a nightly job for beta-v5.9 build. I keep forgetting to do it.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-21 13:48:17 +01:00
Adam Warner
1f19941b4c Merge branch 'dev' 2021-08-20 20:03:48 +01:00
Adam Warner
d69a8febae Merge pull request #902 from pi-hole/fix/ServerIP
Set FTL REPLY addresses instead of setupVars.conf.
2021-08-20 11:54:47 +01:00
Dan Schaper
a26eb9c6ad Set FTL REPLY addresses instead of setupVars.conf.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-08-19 17:29:54 -07:00
Maja Bojarska
2fcc4f66ee Fix typos "Descrption" 2021-08-15 14:15:09 +02:00
Dan Schaper
066f891cc1 Dependabot manage GHA versions.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-08-13 21:51:01 -07:00
Adam Warner
f50ce4637f Merge branch 'dev' 2021-08-06 01:27:57 +01:00
Adam Warner
56f4933237 Add an addional version injection case, for when core versions are not on alternative branches.
Move ENV VAR up higher in the Dockerfile so that `install.sh` actually sees it...

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-06 01:27:45 +01:00
Adam Warner
ea95c4f3e5 Merge branch 'dev' 2021-08-05 20:21:43 +01:00
Adam Warner
88518b036d Inject the container tag into the web interface footer
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 20:21:35 +01:00
Adam Warner
eb36372dea Merge branch 'dev' 2021-08-05 13:05:48 +01:00
Adam Warner
3865e77c6e Introduce internal PIHOLE_TAG variable so that we can see what tag the container is...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-05 00:59:34 +01:00
Adam Warner
388f0f01a1 Disable some more pihole functions when run from within docker
Inject a message into the debug output that lets us know it's been run in a docker container

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-04 23:41:39 +01:00
Adam Warner
6c3ccfcd4f Merge pull request #893 from pi-hole/dev
Sync dev into master
2021-08-04 19:16:12 +01:00
Adam Warner
bdaf352a23 Allow for passing in optional branch name to workflow_dispatch build
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-04 18:52:37 +01:00
Adam Warner
55b257126b bump web_version 2021-08-04 18:44:04 +01:00
Adam Warner
1f1dc03a69 Merge pull request #888 from DistractionRectangle/Set-Phasers-to-Stun
Remove Unneccessary kill -9
2021-08-04 18:43:09 +01:00
Adam Warner
2b2e05dce3 Merge pull request #890 from danifr/patch-1
Use nginxproxy's DockerHub registry
2021-08-04 18:42:18 +01:00
Adam Warner
451fc19432 Merge branch 'dev' into patch-1 2021-08-04 18:41:56 +01:00
Adam Warner
8d536703d9 Merge branch 'master' into patch-1 2021-08-04 18:41:37 +01:00
Adam Warner
58e1eac241 Merge pull request #857 from orazioedoardo/fix-dns-bogus-priv
Fix DNS_BOGUS_PRIV description
2021-08-04 18:36:59 +01:00
Adam Warner
91d75416b8 Merge branch 'dev' into fix-dns-bogus-priv 2021-08-04 18:36:18 +01:00
Adam Warner
e65890208b Merge pull request #869 from tlgs/master
Add documentation for WEBPASSWORD_FILE
2021-08-04 18:34:58 +01:00
Adam Warner
559b317148 Merge branch 'dev' into master 2021-08-04 18:32:59 +01:00
Adam Warner
92999dff08 Merge pull request #886 from gbrsni/dev
Small correction in the 'Quick Start' section of the README
2021-08-04 18:29:00 +01:00
Adam Warner
1c6ba2d3c7 Merge pull request #882 from pi-hole/rem-debconf-set-selections
Remove no longer needed workaround for resolvconf
2021-08-04 18:27:55 +01:00
Adam Warner
a45725ed37 Merge pull request #883 from DistractionRectangle/fix-gravitydb-check
Fix gravityDB check
2021-08-04 16:51:17 +01:00
Adam Warner
e98dff970f Merge branch 'dev' into rem-debconf-set-selections 2021-08-04 16:40:05 +01:00
Adam Warner
e674bb4b81 Merge branch 'dev' into fix-gravitydb-check 2021-08-04 16:39:12 +01:00
Adam Warner
6820b2e55c Merge branch 'dev' into Set-Phasers-to-Stun 2021-08-04 16:39:06 +01:00
Adam Warner
cec28c79f4 Merge pull request #892 from pi-hole/tweak/multiarch-image-rebuild
Switch `multiarch/debian-debootstrap` to `pihole/debian-debootstrap` to fix build issues
2021-08-04 16:37:15 +01:00
Adam Warner
a44b7f1205 Use the rebuild images in the pihole namespace
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-04 15:50:12 +01:00
Adam Warner
bf82c2e8f5 [skip ci] Merge new envvar layout from master into dev
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-08-04 11:36:55 +01:00
Daniel Fernández
73f1cb3e74 Use nginxproxy's DockerHub registry
The official nginx-proxy repo is transitioned away from jwilder/nginx-proxy
ad7c02570b

Signed-off-by: Daniel Fernández <daferoes@gmail.com>
2021-08-04 11:23:10 +02:00
Dan Schaper
8565c3828d [skip ci] Break out defaults and values for clarity.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-08-03 13:43:44 -07:00
Dan Schaper
d0e6b77fdb Break out defaults and values for clarity.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-08-03 12:06:09 -07:00
gbrsni
b5046af667 Update README.md
Now suggesting usage of the '-d' flag.
2021-07-28 07:56:31 +00:00
D.Rect
408f71a480 Remove Unneccessary kill -9
Since piholeFTL test properly spins down it's no longer
necessary to kill it. He's dead Jim

Merge #300, added `piholeFTL test` to the startup sequence to
replace dnsmasq as a dependency for validate_env and gravity.sh.
kill -9 was kept as a work around to a standing issue that
`piholeFTL test` didn't spin down on it's own. This was fixed
in pi-hole/FTL#1067, landed on Apr 14 2021 and confirmed
working, as evinced by #834 which was filed the same day it
that fix landed.

Signed-off-by: D.Rect <48034372+DistractionRectangle@users.noreply.github.com>
2021-07-25 08:25:35 -07:00
D.Rect
7650896158 Fix gravityDB check
piholeFTL exposes configuration to relocate/rename gravityDB so
we cannot just check a hard coded location. This commit greps
pihole-FTL.conf for a custom location. Since pihole-FTL.conf
will eventually be replaced by TOML, some verbosity is added to
denote what config file is being checked and what location it
ultimately ended up checking.

Signed-off-by: D.Rect <48034372+DistractionRectangle@users.noreply.github.com>
2021-07-24 15:20:38 -07:00
Adam Warner
4dba6339c7 Remove no longer needed workaround for resolvconf
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-07-21 21:31:34 +01:00
Adam Warner
ba9d2e54bf Merge pull request #881 from pi-hole/fix-grav-firstrun
Ignore SKIPGRAVITYONBOOT if gravity.db does not exist
2021-07-21 21:03:16 +01:00
Adam Warner
d13ae118b4 Merge pull request #879 from MichaIng/patch-2
Remove obsolete debconf-apt-progress workaround
2021-07-21 19:54:04 +01:00
Adam Warner
7d82719839 Add note to README
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-07-21 19:45:28 +01:00
Adam Warner
70c573b69e Ignore SKIPGRAVITYONBOOT if not gravity.db exists, which will be the case if a fresh container is built with a new (empty) volume mapped to it.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-07-21 19:41:35 +01:00
MichaIng
bd121aa471 @MichaIng Remove obsolete debconf-apt-progress workaround
Since https://github.com/pi-hole/pi-hole/pull/2962 debconf-apt-progress is not used anymore in the basic-install.sh script, making the workaround obsolete.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-07-21 20:16:46 +02:00
Adam Warner
28b5154e52 Include information about nightly/beta tags
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-07-04 22:07:46 +01:00
Adam Warner
918e6b1a21 convert / to - in FTL_VERSION so that image name is valid
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-07-04 21:46:45 +01:00
Adam Warner
9292d8e58a Merge branch 'master' into dev 2021-07-04 19:01:07 +01:00
Adam Warner
76be304d79 remove #yolo from nightly build yml
add custom build task... (not holding my breath)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-07-04 18:52:13 +01:00
Adam Warner
0c5ffd72f4 Merge pull request #873 from adyanth/dev
Update README.md to add changes in #867
2021-07-04 14:35:38 +01:00
Adyanth H
3022fa5092 Update README.md to add changes in #867
Signed-off-by: Adyanth H <adyanthh@gmail.com>
2021-07-04 13:09:16 +00:00
Adam Warner
2bc1e9c5cb Merge pull request #867 from adyanth/dev
Adding CORS_HOSTS to PHP environment
2021-07-04 11:49:42 +01:00
Tiago Seabra
f95bcba67a docs: add WEBPASSWORD_FILE to README
Signed-off-by: Tiago Seabra <tlgs@users.noreply.github.com>
2021-06-17 16:03:36 +01:00
Adyanth H
437e8ddbf5 Change tab to spaces
Signed-off-by: Adyanth H <33192449+adyanth@users.noreply.github.com>
2021-06-16 10:53:28 +05:30
Adyanth H
901ee3d10b Adding CORS_HOSTS to PHP environment
Signed-off-by: Adyanth H <33192449+adyanth@users.noreply.github.com>
2021-06-07 16:01:39 +05:30
Adam Warner
5ed2b9ab2c Merge pull request #861 from lightswitch05/feature/single-versions-file
Single versions file
2021-06-05 22:01:14 +01:00
Daniel
6b1765c638 Single pihole version file. Added 'python-dotenv' to parse for the VERSIONS file.
Signed-off-by: Daniel <daniel@developerdan.com>
2021-06-04 19:37:28 +00:00
Adam Warner
67b04365c5 Merge pull request #856 from AlexandreRatte/Issue_778
Introduced WEBTHEME environment variable to control user interface theme selection.
2021-06-03 12:03:14 +01:00
Orazio
39fa779653 Fix DNS_BOGUS_PRIV description
Setting the DNS_BOGUS_PRIV variable to true blocks (not enables) reverse dns lookups for private ranges.
2021-05-20 15:00:34 +02:00
Alexandre Ratte
2484c9ced2 Merge branch 'dev' of https://github.com/AlexandreRatte/docker-pi-hole into Issue_778
Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
2021-05-15 08:38:43 -04:00
Alexandre Ratte
c4caf293f7 Amended comment.
Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
2021-05-15 08:34:09 -04:00
Alexandre Ratte
d0c152eb25 Documented WEBTHEME environment variable.
Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
2021-05-15 08:31:24 -04:00
Alexandre Ratte
995ec08608 Changed invalid WEBTHEME value's fallback theme to default-light, to stay inline with pi-hole's default.
Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
2021-05-15 08:31:24 -04:00
Alexandre Ratte
504f3bac3b Added WEBTHEME parsing.
Signed-off-by: Alexandre Ratte <alexandre.ratte@gmail.com>
2021-05-15 08:31:24 -04:00
Adam Warner
99de0dce83 Merge pull request #689 from jparenas/cache_size
Add CACHE_SIZE environment variable to the available options
2021-05-12 20:50:45 +01:00
Adam Warner
58d2c6a934 [skip ci] Merge branch 'master' into dev 2021-05-12 20:24:11 +01:00
Adam Warner
0954c9f3dd [skip ci] remove buster from builds for now - they are not currently functional.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-05-12 20:23:51 +01:00
Adam Warner
c436a8a053 Merge branch 'master' into dev 2021-05-12 20:15:28 +01:00
Adam Warner
3acf505a1a [skip ci] Update multi-arch nightly build script, too. 2021-05-12 20:14:52 +01:00
Adam Warner
60063a81fd [Skip CI] Change nightly time from every 5 mins to 2am 2021-05-12 19:23:10 +01:00
Adam Warner
4963578fb5 Update nightly-experiment.yml 2021-05-12 18:45:55 +01:00
Adam Warner
e64b1d0c0a Create nightly-experiment.yml 2021-05-12 18:35:38 +01:00
jparenas
73378d1231 Add CUSTOM_CACHE_SIZE environment variable to the available options
Signed-off-by: jparenas <juan.p.arenas1@gmail.com>
2021-05-08 16:11:57 -05:00
Adam Warner
47c15eb65d Merge pull request #843 from pi-hole/install-overhaul
`install.sh` overhaul
2021-05-08 15:19:57 +01:00
Adam Warner
fcd002d507 Merge pull request #853 from lightswitch05/task/resync-dev-with-master
Resync dev with master
2021-05-04 15:50:00 +01:00
Daniel
bd343fc3da Merge branch 'master' of github.com:pi-hole/docker-pi-hole into task/resync-dev-with-master 2021-05-04 14:10:41 +00:00
dependabot[bot]
1f46ed4cbe Merge pull request #848 from pi-hole/dependabot/pip/cryptography-3.3.2 2021-05-03 23:08:02 +00:00
dependabot[bot]
3db66a66fa Bump cryptography from 2.8 to 3.3.2
Bumps [cryptography](https://github.com/pyca/cryptography) from 2.8 to 3.3.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/2.8...3.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-03 22:45:32 +00:00
Daniel
622294a7a1 Merge pull request #846 from pi-hole/dependabot/pip/py-1.10.0 2021-05-03 18:40:35 -04:00
dependabot[bot]
70ae3baf75 Bump py from 1.8.1 to 1.10.0
Bumps [py](https://github.com/pytest-dev/py) from 1.8.1 to 1.10.0.
- [Release notes](https://github.com/pytest-dev/py/releases)
- [Changelog](https://github.com/pytest-dev/py/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/py/compare/1.8.1...1.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-03 22:26:00 +00:00
Daniel
2b270c75b7 Merge pull request #845 from pi-hole/dependabot/pip/pyyaml-5.4 2021-05-03 18:21:02 -04:00
dependabot[bot]
1ff3d7a5fc Bump pyyaml from 5.2 to 5.4
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.2 to 5.4.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/5.2...5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-03 22:02:20 +00:00
dependabot[bot]
35b5c80408 Merge pull request #847 from pi-hole/dependabot/pip/jinja2-2.11.3 2021-05-03 21:57:19 +00:00
dependabot[bot]
59e177525a Bump jinja2 from 2.10.3 to 2.11.3
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.3 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.10.3...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-03 21:41:28 +00:00
dependabot[bot]
27135f263f Merge pull request #850 from pi-hole/dependabot/pip/urllib3-1.25.8 2021-05-03 21:36:19 +00:00
Adam Warner
ac444c44f2 Update install.sh
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-05-03 15:25:26 +01:00
Adam Warner
96408f91a7 Merge pull request #849 from matthewbeckler/dev
Add note regarding changing Pi-hole DNS setting when using docker bridge networking
2021-05-01 00:29:37 +01:00
Adam Warner
151d588c4c Update VERSIONS
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com>
2021-05-01 00:24:37 +01:00
dependabot[bot]
071b169896 Bump urllib3 from 1.25.7 to 1.25.8
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.7 to 1.25.8.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.7...1.25.8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-30 22:04:12 +00:00
Matthew Beckler
f9c51379b0 Add note regarding changing Pi-hole DNS setting when using docker bridge networking 2021-04-29 14:42:50 -05:00
Adam Warner
42f1fa3380 Wrong conditional...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-19 23:20:58 +01:00
Adam Warner
5ca1dbf35f Massive overhaul of `install.sh based on how I test fresh installs of differing branches/tags
First git clone the repos, next checkout the relevant branches and finally run the install script. Simples.
`sed`ed out a couple of other unsupported functions

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-19 23:06:00 +01:00
Adam Warner
ebe72b45e4 Merge pull request #737 from shaderecker/symlink
Remove broken doco-example.yml symlink
2021-04-19 14:54:52 +01:00
Adam Warner
c36d6ae501 Merge pull request #842 from pi-hole/master
master->dev
2021-04-19 09:52:40 +01:00
Adam Warner
2e04f5abee Add upgrade note for v.58 2021-04-19 09:38:15 +01:00
Adam Warner
17f6ef8e56 Merge pull request #837 from pi-hole/dev
Release 5.8 - "Third time's the charm" edition
2021-04-17 18:23:33 +01:00
Adam Warner
c9a3ac0df1 Merge pull request #818 from static-void-main/dev
Add support for the i386 architecture
2021-04-17 17:17:57 +01:00
Adam Warner
784be64178 Merge pull request #839 from pi-hole/tweak/valid_ip
Check for validity of values passed in through `PIHOLE_DNS_`
2021-04-17 11:17:25 +01:00
Adam Warner
82ef6544a4 Merge pull request #840 from pi-hole/revert-743-docker-hostname
Revert "Add `hostname` to docker-compose"
2021-04-17 00:54:31 +01:00
Adam Warner
59c08f36ee Revert "Add hostname to docker-compose" 2021-04-17 00:53:51 +01:00
Adam Warner
dba2317072 Merge pull request #769 from ignic/dhcp_setup
Enable DHCP Server with environment variables
2021-04-16 23:45:43 +01:00
Adam Warner
4b7c35be7e Merge pull request #743 from e2jk/docker-hostname
Add `hostname` to docker-compose
2021-04-16 23:31:56 +01:00
Adam Warner
f6b9716a75 Additionally, exit script if 0 valid entries are detected
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-16 23:19:58 +01:00
Adam Warner
14e3bcb480 Check for validity of values passed in through PIHOLE_DNS_ Throw away junk.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-16 22:56:09 +01:00
Adam Warner
e88429a65d Merge branch 'dev' of github.com:pi-hole/docker-pi-hole into dev 2021-04-16 21:56:13 +01:00
Adam Warner
4f531d9e78 Irrelevant since IP blocking is no longer the default method.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-16 21:55:55 +01:00
Adam Warner
87c99a0b8c Merge pull request #823 from limes007/master
Make test of IPv6 env variable case insensitive
2021-04-16 19:40:25 +01:00
Adam Warner
6f865b1699 Remove some out of date info about not remapping port 80.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-16 18:40:47 +01:00
Adam Warner
ba6f7f9d62 remove Upgrade notices section. It's old, and there isn't really anything relevant in there any more. 2021-04-16 18:33:01 +01:00
Adam Warner
1207b5cb88 Merge pull request #836 from mdzw/patch-1
Move gravity on boot to a @reboot cron job
2021-04-16 17:51:28 +01:00
Matt Winter
1633a976a4 Only remove the cron.d file if it exists
Signed-off-by: Matt Winter <MattWinter@gmail.com>
2021-04-16 12:36:13 -04:00
Matt Winter
fa771f74fd Change gravity-on-boot so it's run by cron
Proposed solution to #834

I believe the correct way to solve this issue is to change when "Gravity on Boot" is run.

The s6 init system has different stages. Currently, "gravity on boot" is run during Stage 2.ii: cont-init.d. One instance of pihole-FTL is started during cont-init, but it is only there to check the validity of the config files; it exits soon after starting. The final "service mode" instance of pihole-FTL is not started until Stage 2.iii, when the supervisor starts doing work.

If gravity.sh is counting on FTL to do its DNS lookups, then we should not run gravity until the supervised instance of FTL is running. We can accomplish this by moving "Gravity on Boot" to a @reboot line in /etc/cron.d/gravity-on-boot, and making that file's existence dependent on the value of SKIPGRAVITYONBOOT.

This will work because cron isn't started until we've reached Stage 2.iii.

Signed-off-by: Matt Winter <MattWinter@gmail.com>
2021-04-16 10:58:14 -04:00
static-void-main
6f21b020f8 Add i386 arch to deployment script
Signed-off-by: static-void-main <33235498+static-void-main@users.noreply.github.com>
2021-04-15 01:09:22 +02:00
static-void-main
6292fd1294 Add i386 arch
Signed-off-by: static-void-main <33235498+static-void-main@users.noreply.github.com>
2021-04-15 00:15:31 +02:00
Adam Warner
68ad7b045d Merge pull request #833 from pi-hole/dev
Release 5.8 - Take 2
2021-04-14 23:03:00 +01:00
Adam Warner
fe7f0c8612 Merge pull request #832 from pi-hole/release/v5.8-1
Release prep
2021-04-14 22:47:07 +01:00
Adam Warner
692a12c2c6 Acccount for core 5.3.1
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-14 22:27:50 +01:00
Adam Warner
731cd5e907 Merge pull request #831 from pi-hole/dev
Release v5.8
2021-04-14 19:34:09 +01:00
Adam Warner
e6a45eb96b prep for new release (#830)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-14 19:18:20 +01:00
Kyle Kurz
f53015157d Issue #824 - Don't log password (#825)
When setting the password, explicitly disable bash logging. Leave the
re-enable code so that other functions work as expected. Additionally,
do not remove the print in generate_password so randomly generated
passwords are still logged for user consistency.

Signed-off-by: Kyle Kurz <kyle@doublekaudio.com>
2021-04-14 17:13:01 +01:00
Adam Warner
190844d0b0 remove no longer required code (#736)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-14 14:36:55 +01:00
Adam Warner
6532390647 Only set one PIHOLE_DNS_ entry in the install script (#826)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-04-13 19:09:40 +01:00
Daniel
26aea62e22 Added new Debian version: bullseye (#828)
Signed-off-by: Daniel <daniel@developerdan.com>
2021-04-13 18:09:31 +01:00
limes007
ededb44601 fix test of IPv6 env variable
Signed-off-by: limes007 <39467727+limes007@users.noreply.github.com>
2021-04-09 21:10:53 +02:00
Adam Warner
c0e55c156f Remove port 443 from templates and documentation. (Redo) (#808)
* Update docker_run.sh

* Update docker-compose.yml.example

* Update README.md

* Update Dockerfile

Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-02-26 20:09:31 +00:00
Adam Warner
6d9913e824 Merge pull request #807 from pi-hole/master
Master -> Dev
2021-02-26 19:44:48 +00:00
Dan Schaper
20cd9c3abf Merge pull request #803 from pi-hole/fix/GH_IssueTemplate2
Add required front matter to bug report template.
2021-02-18 13:05:53 -08:00
Dan Schaper
e6307df638 Add required front matter to bug report template. 2021-02-18 12:56:33 -08:00
Dan Schaper
14f6262491 Merge pull request #800 from pi-hole/fix/issue_templates
Override default issue templates
2021-02-18 12:50:21 -08:00
Dan Schaper
bcd9ad5157 Copy default config.yml
From the docs:

> If a repository has any files in its own .github/ISSUE_TEMPLATE folder, including issue templates or a config.yml file, none of the contents of the default .github/ISSUE_TEMPLATE folder will be used.

So we need to copy the config.yml since it will be ignored.
2021-02-18 10:25:05 -08:00
Dan Schaper
6e1e93112d Override default issue templates 2021-02-18 10:17:40 -08:00
Adam Warner
5acc88ef86 Merge pull request #798 from pi-hole/master
sync master back to dev
2021-02-17 00:12:15 +00:00
Adam Warner
8d57c8ce7b Merge pull request #797 from pi-hole/dev
Dev -> master
2021-02-16 23:31:34 +00:00
Adam Warner
ea7f659874 Merge branch 'master' into dev 2021-02-16 23:17:52 +00:00
Adam Warner
abdf9f1130 remove shared memory files before starting the FTL process. Mimics bare metal service script (to an extent) (#796)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-02-16 23:09:49 +00:00
Adam Warner
75328c63f8 Merge pull request #793 from pi-hole/dev
Release 5.7
2021-02-16 20:19:25 +00:00
Adam Warner
3f0a7d85b1 bump web version
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-02-16 19:50:09 +00:00
Adam Warner
c5484e6a85 Merge pull request #792 from optimusprime01/devel
fixing typos in ReadMe
2021-02-16 09:15:31 +00:00
Sachin Sunder Sagadevan
dad930f9d2 fixing typos in ReadMe
Signed-off-by: Sachin Sunder Sagadevan <sachsun2809@outlook.com>
2021-02-15 20:25:12 -08:00
Adam Warner
b39f53d12e Merge pull request #790 from Sounie/documentation-tidy-ups
Couple of typos in docs.
2021-02-12 20:34:45 +00:00
Stephen Souness
a51f69bef9 Couple of typos in docs. 2021-02-12 19:23:55 +00:00
Adam Warner
0669b0fe91 Merge pull request #786 from loehden/dev
Changed description of the DNSMASQ_LISTENING environment variable in README.md
2021-02-10 18:55:48 +00:00
Adam Warner
3d42c16217 Merge pull request #787 from pi-hole/new/falseErrors
Fixing errors with regexfile and chmod/chown [Alt]
2021-02-10 18:04:38 +00:00
Adam Warner
6b6ba9b458 accidentally a reference
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-02-10 17:46:09 +00:00
Tyler Spires
c23b1d6894 forgot to remove the dhcp.leases from the original line.
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2021-02-10 17:31:47 +00:00
Tyler Spires
29cf35b2c5 Fixing error with dhcp.leases too.
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2021-02-10 17:31:33 +00:00
Adam Warner
8cf36e6f7e Remove chmod of no longer used file
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-02-10 17:31:31 +00:00
Benjamin Löhden
7adccc0287 Update README.md
Signed-off-by: Benjamin Löhden <3964467+loehden@users.noreply.github.com>
2021-02-09 00:17:28 +01:00
Adam Warner
7c135f5ce8 Merge pull request #777 from pi-hole/master
master->dev
2021-01-27 18:38:37 +00:00
Adam Warner
79ead80720 Merge pull request #776 from pi-hole/dev
v5.6 Release
2021-01-27 18:34:45 +00:00
Adam Warner
302924a3e2 Merge branch 'master' into dev 2021-01-27 18:16:33 +00:00
Adam Warner
0a8d174ef7 prep for new release 2021-01-27 18:11:32 +00:00
Adam Warner
5735495ec7 Merge pull request #771 from MichaIng/patch-2
Skip full distro check on start
2021-01-27 17:42:58 +00:00
MichaIng
512f610afa Skip full distro check on start
The distro_check function includes updating the APT cache, checking for dependencies, which is both not required on Docker start where all required packages are installed already. The only required steps from this function is the webserver user and config file names, which can be applied directly instead since we know that the Pi-hole Docker container is based on Debian.

Furthermore this solves the issue that updating the APT cache fails, when Pi-hole itself is used for DNS resolution, since pihole-FTL has not yet been started at this stage. That failure was not visible since "apt-get update" does not exist with error code (currently) when facing DNS resolving issues, even if not a single list could have been updated, and no other step is done that would require DNS resolving, until pihole-FTL is started. For a regular (non-Docker) install or update it is however reasonable to error out directly when the APT cache could not have been updated, to not defer the exit unnecessarily to a harder-to-debug stage.

Signed-off-by: MichaIng <micha@dietpi.com>
2021-01-24 15:14:18 +01:00
Ignacio Serrano
e40ed3b5cc update doc README.md with DHCP server setup
Signed-off-by: Ignacio Serrano <ignic@ignic.com>
2021-01-23 21:23:05 +01:00
Ignacio Serrano
c5f682d1e7 allows DHCP server setup with env vars
Signed-off-by: Ignacio Serrano <ignic@ignic.com>
2021-01-23 21:23:05 +01:00
Adam Warner
4902b4cc6a Merge pull request #765 from pi-hole/dev
Release 5.5
2021-01-19 12:55:39 +00:00
Adam Warner
0f618ffc31 bump core and web version numbers
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-01-19 12:41:46 +00:00
Adam Warner
91fd3933aa Merge pull request #761 from pi-hole/master
Master back into Dev
2021-01-16 20:28:22 +00:00
Adam Warner
c75ca906e7 Merge pull request #760 from pi-hole/fix/latest-tag
Use Location: header for GitHub API call for latest tag detection.
2021-01-16 20:07:19 +00:00
Dan Schaper
494667c85d Use Location: header for GitHub API call
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2021-01-16 11:45:26 -08:00
Adam Hill
9bcd8e163a Merge pull request #758 from pi-hole/dev
Latest versions to master
2021-01-16 09:13:07 -06:00
Adam Warner
b154947cb9 Merge branch 'master' into dev 2021-01-16 13:05:57 +00:00
Adam Warner
1d35a336b4 Merge pull request #754 from pi-hole/fix/query_logging
Ensure that QUERY_LOGGING value is persisted between container runs
2021-01-16 12:34:29 +00:00
Adam Warner
0d9fc510cf Merge pull request #757 from pi-hole/release-prep
Prepare for new release
2021-01-16 12:34:02 +00:00
Adam Warner
1aefa3b063 bump core and web version numbers (we _have_ to find a better way!)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-01-15 20:42:32 +00:00
Adam Warner
39090babf5 Ensure that QUERY_LOGGING value is persisted between container runs
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-01-09 21:45:17 +00:00
Emilien Klein
8f53e1bd22 Using pi.hole as hostname
To be consistent with the parameter already defined in docker_run.sh
(leaving the jwilder-proxy example to pihole.yourDomain.lan to be 
consistent with the rest of that file's content, namely DEFAULT_HOST)
2020-12-27 16:10:45 +01:00
Emilien Klein
64a1f548ef Add hostname to docker-compose
If this is not set, the PiHole admin page shows the Docker container's 
ID as hostname instead.
2020-12-27 15:24:29 +01:00
Adam Warner
5c21f146f4 Merge pull request #741 from pi-hole/dev
v5.2.2 and various to master
2020-12-25 00:04:17 +00:00
Adam Hill
99b6dc9503 Merge pull request #740 from pi-hole/release-prep
Bump Version number to latest Pi-hole Core
2020-12-24 13:56:51 -06:00
Adam Warner
a445507627 Bump to latest Pi-hole core version (web is at the same version currently)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-12-24 11:20:32 +00:00
Adam Warner
f445660079 Merge pull request #739 from shaderecker/typos
Fix typo in cronjob comment
2020-12-23 19:02:44 +00:00
Adam Warner
c0bf6c91f6 Merge pull request #738 from shaderecker/docu
Documentation updates
2020-12-23 18:58:34 +00:00
Sebastian Haderecker
a6eaf7313c Fix typo in cronjob comment
Signed-off-by: Sebastian Haderecker <sebastian.haderecker@gmail.com>
2020-12-23 18:18:18 +00:00
Sebastian Haderecker
5dbf46aa05 Fix formatting, typos and the link
Signed-off-by: Sebastian Haderecker <sebastian.haderecker@gmail.com>
2020-12-23 16:21:23 +00:00
Sebastian Haderecker
6ef8ef1f15 We use Github Actions
Signed-off-by: Sebastian Haderecker <sebastian.haderecker@gmail.com>
2020-12-23 16:03:22 +00:00
Sebastian Haderecker
7485a84d2d Remove broken symlink
Signed-off-by: Sebastian Haderecker <sebastian.haderecker@gmail.com>
2020-12-23 15:50:23 +00:00
Adam Warner
e6bff1ac32 Merge pull request #727 from pi-hole/new/setallthedns
Re-jig how Pi-hole's upstream DNS servers are set
2020-12-19 18:43:36 +00:00
Adam Hill
f1cc22e5e0 Merge pull request #731 from pi-hole/master
Sync master to dev
2020-12-19 12:37:24 -06:00
Adam Warner
325c49f7b3 Merge pull request #722 from dfsx1/dev
Upgrade s6-overlay to v2.1.0.2
2020-12-19 18:06:24 +00:00
Adam Warner
0cb7324a60 Further simplifications
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-12-16 22:19:20 +00:00
Adam Warner
f77e4609ce Introduce new env VAR for setting PIHOLE_DNS_x values.
If not set, keep existing values in setupVars
if no existing values in setupVars - fall back to defaults

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-12-16 21:41:09 +00:00
Adam Warner
b0a14b7eb9 Merge pull request #721 from pi-hole/tweak/envVars
Prevent unset env vars overwriting setupvars.conf values
2020-12-16 18:03:42 +00:00
Dan Schaper
c525df56fa Merge pull request #725 from pi-hole/update/remove-traefik-docs
Remove outdated configuration
2020-12-13 14:18:55 -08:00
Dan Schaper
02a28b25ae Remove outdated configuration
This uses environment variables that do not exist.
2020-12-11 10:06:13 -08:00
dfsx1
9bdfe868bd S6_VERSION: v2.1.0.2
https://github.com/just-containers/s6-overlay/releases/tag/v2.1.0.2

Signed-off-by: dfsx1 <dfsx1@users.noreply.github.com>
2020-12-07 21:58:04 +01:00
Adam Warner
5d1d394b1b Test for env vars being set before changing settings. Should preserve values set in setupVars.conf
Co-authored-by: xBelladonna <isabelladonnamoore@outlook.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-12-04 11:20:16 +00:00
Adam Warner
8c62a1437a Merge pull request #690 from damajor/patch-1
Add QUERY_LOGGING missing export
2020-12-03 18:18:12 +00:00
Adam Hill
89972b3ce5 Merge pull request #717 from pi-hole/dev
Dev to Master [5.2.1]
2020-12-02 16:38:10 -06:00
Adam Warner
90dada0a8a prep dev for 5.2.1
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-12-02 21:34:25 +00:00
Adam Warner
121f3f92c9 Merge pull request #714 from mparramont/patch-1
Fix file to copy in  README.md
2020-12-02 21:32:52 +00:00
Adam Warner
ee42fdae04 Merge pull request #712 from pi-hole/tweak/REV_SERVER
Introduce new REV_SERVER environment variables. Deprecate CONDITIONAL_FORWARDING ones, but maintain backward compatibility
2020-12-02 21:31:38 +00:00
Miguel Parramon
b669826149 Update README.md
😄

Signed-off-by: Miguel Parramón <mparramont@gmail.com>
2020-12-02 15:36:57 +08:00
DL6ER
105eb1165f Update README.md
Co-authored-by: Adam Warner <me@adamwarner.co.uk>
2020-12-01 19:56:55 +01:00
Adam Warner
941e433834 accidentally 4x=
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-11-30 22:15:31 +00:00
Adam Warner
e7bfad6301 Introduce new REV_SERVER environment variables. Deprecate CONDITIONAL_FORWARDING ones, but maintain backward compatibility
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-11-30 21:46:50 +00:00
Adam Hill
1c421b0f7c Merge pull request #706 from pi-hole/dev
Dev to Master [v5.2]
2020-11-29 14:47:47 -06:00
Adam Hill
72a1c8290d Merge pull request #705 from pi-hole/release-prep
Prepped dev for 5.2 which will then goto master for tagging
2020-11-29 13:42:32 -06:00
Adam Hill
f1d4efe766 Unsupported OS detected: Debian 9
Signed-off-by: Adam Hill <adam@diginc.us>
2020-11-29 13:29:07 -06:00
Adam Hill
7792b91ccc set WEB_VERSION
Signed-off-by: Adam Hill <adam@diginc.us>
2020-11-29 13:15:05 -06:00
Adam Hill
9a94ade8dd Prepped dev for 5.2 which will then goto master for tagging
Signed-off-by: Adam Hill <adam@diginc.us>
2020-11-29 12:55:27 -06:00
Dan Schaper
c90f3c5aa5 Merge pull request #703 from AlexisWilke/dev
Remove second verb.
2020-11-12 14:59:06 -08:00
Dan Schaper
352bb55f4c Merge branch 'dev' of https://github.com/alexiswilke/docker-pi-hole into alexiswilke-dev 2020-11-12 13:51:41 -08:00
AlexisWilke
2bd15dea8f Remove second verb.
Signed-off-by: AlexisWilke <alexis@m2osw.com>
2020-11-12 13:51:17 -08:00
-_-
e67952eaec Merge branch 'dev' into patch-1 2020-11-12 22:44:42 +01:00
Dan Schaper
fa065c2434 Merge pull request #704 from lightswitch05/bugfix/broken-sed-tests
Bugfix: Fix broken sed tests
2020-11-12 13:12:59 -08:00
Daniel
e64f2d682b Lock Python version to 3.8 since it is being referenced in SED command
Signed-off-by: Daniel <daniel@developerdan.com>
2020-11-12 15:51:20 -05:00
AlexisWilke
30bf5fe0d1 Merge branch 'master' into dev 2020-11-11 15:29:52 -08:00
AlexisWilke
8ba1eea803 Remove second verb.
Signed-off-by: AlexisWilke <alexis@m2osw.com>
2020-11-11 07:17:13 -08:00
-_-
9324107088 QUERY_LOGGING Documentation update 2020-10-11 17:28:37 +02:00
-_-
2c7be7c3cb Add missing QUERY_LOGGING in export list 2020-10-11 17:23:03 +02:00
Adam Hill
1f64381ebb Merge pull request #683 from lightswitch05/feature/make-buster-the-default-debian-version
Make buster the default debian version
2020-10-03 20:36:37 -05:00
Daniel
a779c7fc37 Make the default debian version buster, preserve the 'stretch' tag for those who need it.
Signed-off-by: Daniel <daniel@developerdan.com>
2020-09-28 17:12:03 -04:00
Adam Hill
87132465b5 Merge pull request #672 from AthrogatePEQ/master
Ability to skip Gravity refresh on startup
2020-08-22 20:38:17 -05:00
Athrogate
97d00cd936 Update README.md
Documenting the SKIPGRAVITYONBOOT variable.

Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Athrogate
5a35eca5e2 Update README.md
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Athrogate
6e5bf71595 Update README.md
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Athrogate
a9f423ff37 Update README.md
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Athrogate
a30bd0528f Update README.md
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Athrogate
8770b9789b Update 20-start.sh
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Athrogate
7248b3c915 Update 20-start.sh
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Athrogate
e15017d69a Update 20-start.sh
Signed-off-by: Tyler Spires <shadrach145@gmail.com>
2020-08-22 18:17:17 -04:00
Adam Hill
52e819a975 Merge pull request #674 from pi-hole/master
Sync dev from master
2020-08-22 15:27:34 -05:00
Adam Hill
7199d938e1 Merge pull request #661 from fawaf/master
use docker-compose example yaml
2020-08-22 14:39:39 -05:00
Felix Wong
93b86c8981 use docker-compose example yaml
Signed-off-by: Felix Wong <felix@fawong.com>
2020-08-17 20:09:39 +00:00
Adam Hill
daa3c1e45c releases tags with ^v 2020-08-09 21:39:57 -05:00
Adam Hill
41f109cf48 Bump web version 2020-08-09 21:22:28 -05:00
Adam Hill
fda66e2f67 Update VERSION 2020-08-09 17:31:46 -05:00
Adam Hill
54e5846c16 Merge pull request #632 from pi-hole/dev
Dev to Master - docker fixes release
2020-08-09 17:28:03 -05:00
Adam Hill
bba93dea3e reset the arch image array between debian versions
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-17 22:10:10 -05:00
Adam Hill
d96a7fe887 return to original to double check if it build branch pushes separately from PRs or not
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-17 21:41:57 -05:00
Adam Hill
28bec77984 fix repo name
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-17 20:51:19 -05:00
Adam Hill
9c791f099f Allow internal PRs to push
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-17 20:35:55 -05:00
Adam Hill
6fc9d4d186 Merge pull request #657 from lightswitch05/feature/drop-circle-ci
Remove circle-ci since it was not updated to work with multi-debian builds
2020-07-16 16:07:02 -05:00
Daniel
7ad7b0824f Report docker build and tag exit code to halt the tests on failure to build
Signed-off-by: Daniel <daniel@developerdan.com>
2020-07-16 16:49:12 -04:00
Daniel
c8781ee427 Remove circle-ci since it was not updated to work with multi-debian builds and is replaced with Github Actions
Signed-off-by: Daniel <daniel@developerdan.com>
2020-07-16 16:32:33 -04:00
Daniel
51daf5cba2 Merge branch 'master' of github.com:pi-hole/docker-pi-hole into bugfix/resolve-dev-merge-conflicts
Signed-off-by: Daniel <daniel@developerdan.com>
2020-07-16 16:26:21 -04:00
Adam Hill
8e5b17e7d3 Merge pull request #653 from pi-hole/v5.1
v5.1.1
2020-07-15 19:03:39 -05:00
Adam Hill
562b6c1d5a Dockerfile.py aborts on error now, workaround whiptail not being wrapped by unattended
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 18:42:29 -05:00
Adam Hill
0b2c4642df v5.1.1
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 18:17:33 -05:00
Adam Hill
1b4677b5ed pull base image
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 17:42:24 -05:00
Adam Hill
0958583bf2 debian, our one true savior from bad docker build base images
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 17:42:14 -05:00
Adam Hill
b50e94e22d revert
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 17:41:12 -05:00
Adam Hill
bb8a8aeedd fix pip
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 17:15:35 -05:00
Adam Hill
d49eebc25d fix pip in outer build container, commit templating
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 17:04:47 -05:00
Adam Hill
4808b9fe8d v5.1
Signed-off-by: Adam Hill <adam@diginc.us>
2020-07-15 16:48:50 -05:00
Adam Hill
88fd258043 Merge pull request #635 from lightswitch05/feature/introduce-debian-version-tags
Introduce additional docker tags for the debian version.
2020-06-29 10:23:13 -05:00
Daniel
752d83aeaa Introduce additional docker tags for the debian version.
* Added new docker tag variations to specify the debian version ('stretch', and 'buster').
* Arch images are alway as specific as possible: pihole/pihole:master-amd64-stretch
* Multiarch images have both the specific debian version tags as well as the generic non-debian tags: pihole/pihole:master-stretch & pihole/pihole:master
* Currently, the non-specific tags point to the 'stretch' images. Eventaully it can be migrated to 'buster'.
* Use GitHub actions to do the builds. Although the script names include 'gh-actions' to differentiate them from the 'circle' scripts, there is zero logic that is specific to Github (ie. no Github environment variables).
* 'armhf:buster' & 'arm64:buster' has an issue with `ip route get`. I think the issue is related to 'qemu', but I'm not sure. Update the `validate_env` function to only use `ip route get` if `nc` reports something strange.

Signed-off-by: Daniel <daniel@developerdan.com>
2020-06-29 09:34:19 -04:00
Adam Hill
3b8227c29d Make image a parameter to allow running with any image 2020-06-03 08:34:28 -05:00
Adam Hill
25d32da895 Merge pull request #631 from pi-hole/new_volume_test_base
New volume test
2020-06-02 16:50:37 -05:00
Adam Hill
022b039718 added remove + recreate container test
Signed-off-by: Adam Hill <adam@diginc.us>
2020-06-02 12:27:09 -05:00
Adam Hill
d832213e3c limit branches to be built
Signed-off-by: Adam Hill <adam@diginc.us>
2020-06-02 08:59:37 -05:00
Adam Hill
765eccea22 Merge branch 'dev' of github.com:diginc/docker-pi-hole into new_volume_test_base
Signed-off-by: Adam Hill <adam@diginc.us>
2020-06-02 08:21:48 -05:00
Adam Hill
3b34fecc41 Merge pull request #618 from pi-hole/no_resolv_check
remove resolv.conf code
2020-05-30 18:30:48 -05:00
Adam Hill
9213bbd322 Merge branch 'dev' of github.com:diginc/docker-pi-hole into no_resolv_check
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-30 18:03:05 -05:00
Adam Hill
5b75953d91 New bash integration style test for volume data
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-30 18:01:43 -05:00
Adam Hill
ce3d6e866e Merge pull request #628 from SuperSandro2000/patch-1
Don't bind to 127.0.0.1 when listening on all ports
2020-05-30 14:25:55 -05:00
Adam Hill
b093aaabd9 Merge pull request #626 from lightswitch05/feature/run-tests-on-github-actions
Feature: Run tests on GitHub actions
2020-05-30 14:24:39 -05:00
Adam Hill
e7bb456701 Merge branch 'dev' into patch-1 2020-05-30 14:23:27 -05:00
Sandro
ecb0aaf805 Don't bind to 127.0.0.1 when listening on all ports
Closes #495

Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
2020-05-30 07:04:55 +02:00
Daniel
55ee5d0e60 Run circle-test.sh in Github Actions on push or PR
Signed-off-by: Daniel <daniel@developerdan.com>
2020-05-28 23:18:52 -04:00
Adam Hill
72f5730d56 have tests use - not _ in tag
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-28 08:25:49 -05:00
Adam Hill
0da5afcd61 print images in build image
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-28 08:15:01 -05:00
Adam Hill
e621670df4 debian, our one true savior from bad docker build base images
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-27 19:26:53 -05:00
Adam Hill
04ab6d447f docker-compose pip is garbage to install
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-27 00:42:32 -05:00
Adam Hill
92c19555bd install docker-compose on circle in build image
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-27 00:15:53 -05:00
Adam Hill
caad778b0c install docker-compose;
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-27 00:10:40 -05:00
Adam Hill
808359e832 Merge pull request #608 from ahuffman/master
Fixes #557
2020-05-27 00:02:06 -05:00
Adam Hill
8e409bdf6f Merge pull request #594 from lightswitch05/feature/consolidate-dockerfiles
Simplify Dockerfile configuration.
2020-05-27 00:00:34 -05:00
Adam Hill
bd831bcc30 Merge branch 'no_resolv_check' of github.com:pi-hole/docker-pi-hole into no_resolv_check
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-26 10:46:34 -05:00
Adam Hill
d7fdb188ed remove resolv conf checks
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-26 10:45:48 -05:00
Dan Schaper
a5b827917e Merge branch 'master' into no_resolv_check 2020-05-25 18:23:13 -07:00
Daniel
6939ea024f Simplify Dockerfile configuration.
* Simplify docker builds by consolidating all arch's into a single Dockerfile and using ARGS for various differences
* Introduce docker-compose based builds (build.yml) for simple management of the various args differences

Signed-off-by: Daniel <daniel@developerdan.com>
2020-05-15 16:06:48 -04:00
Adam Hill
c619303a30 Update ISSUE_TEMPLATE.md 2020-05-15 09:53:14 -05:00
Adam Hill
cecf602df7 Merge branch 'master' into no_resolv_check 2020-05-12 08:42:35 -05:00
Adam Hill
8cb67fde23 Merge pull request #515 from mgalgs/docker-run-storage-dir
docker_run.sh: Add env var to specify storage directory
2020-05-11 19:02:30 -05:00
Adam Hill
740248f18b Add quote for path 2020-05-11 18:38:19 -05:00
Adam Hill
bb292a301c Merge pull request #615 from fhs/script-syntax
Fix docker_run.sh syntax
2020-05-11 18:26:15 -05:00
Adam Hill
a1300b4c01 Merge pull request #607 from chinskiy/compose-traefic-2
Update docker-compose-traefik-proxy.md according to changes in traefik2.X
2020-05-11 18:15:42 -05:00
Adam Hill
3140814a30 Merge branch 'master' into compose-traefic-2 2020-05-11 18:14:19 -05:00
Adam Hill
441bc67159 Update docker-compose-traefik-proxy.md 2020-05-11 18:12:08 -05:00
chinskiy
59753e30a3 pin traefik version, few more tweaks
Signed-off-by: chinskiy <chinskiy93@gmail.com>
2020-05-11 15:41:26 +03:00
Fazlul Shahriar
edde439023 Fix docker_run.sh syntax
The trailing backslash must be the last character on the line for it to
be interpreted as a continuation command.

Signed-off-by: Fazlul Shahriar <fshahriar@gmail.com>
2020-05-11 01:53:49 -04:00
Adam Hill
34ef3d4d86 Merge branch 'master' of github.com:pi-hole/docker-pi-hole into dev 2020-05-10 15:23:58 -05:00
Adam Hill
0a4c0af9a2 use tags for v5.0 show official release in footer
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-10 13:42:57 -05:00
Adam Hill
eb637e07cc Merge pull request #611 from pi-hole/beta-v5.0
v5.0 to master
2020-05-10 13:18:24 -05:00
Adam Hill
e78260cf8b Fixing web version/build failure
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-10 12:43:41 -05:00
Adam Hill
6265a3c88f Revert "disable arm64"
This reverts commit 154272be8a.
2020-05-10 12:12:23 -05:00
Adam Hill
2c47cfa8c5 Merge branch 'master' of github.com:pi-hole/docker-pi-hole into beta-v5.0 2020-05-10 12:06:26 -05:00
Adam Hill
154272be8a disable arm64
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-10 12:04:43 -05:00
Adam Hill
d444a11ad1 Merge branch 'dev' of github.com:pi-hole/docker-pi-hole into beta-v5.0 2020-05-10 11:58:22 -05:00
Adam Hill
ce10b7b655 Merge pull request #562 from NazarKosteckij/patch-1
add missing env variables (Fix issue #553)
2020-05-06 21:46:47 -05:00
Adam Hill
032b53799d Merge pull request #534 from warren-fisher/dev
Add to Ubuntu install section
2020-05-06 21:46:29 -05:00
Andrew J. Huffman
2228115a97 Fixes #557
* Refactored the prepare_configs function in bash_functions.sh
* Now able to set settings via the UI or ENV Variables - ENV Variables override when restarted
* Added ENV Variables for ADMIN_EMAIL, TEMPERATUREUNIT, and WEBUIBOXEDLAYOUT
    - Created setup_temp_unit function in bash_functions.sh
    - Created setup_ui_layout function in bash_functions.sh
    - Created setup_admin_email function in bash_functions.sh
* Updated README.md
    - Added docs on new ENV Variables
    - Updated True/False settings docs so they were quoted, otherwise misleading to k8s users and not "true" booleans

Signed-off-by: Andrew J. Huffman <ahuffman@vmware.com>
2020-05-04 17:29:47 -04:00
chinskiy
9778b5d9a4 update traefik-proxy.md because of traefik v2 uncompatible changes
Signed-off-by: chinskiy <chinskiy93@gmail.com>
2020-05-03 17:55:56 +03:00
Adam Warner
415ccbb132 restore ${CORE_VERSION} variable to FTL checkout command
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-04-19 12:42:35 +01:00
Adam Hill
b9b8b1f8bd Merge pull request #599 from pi-hole/test/ftl-patch
Latest CI error is a build script failure not a real build/test failure.  Its trying to push an image with this branch name as the docker tag but the image was built with v5 branch tag. merging shouldn't hurt
2020-04-18 18:48:42 -05:00
Adam Hill
3c510e2edb remove HTML web port sed/test, no hits exist anymore
Signed-off-by: Adam Hill <adam@diginc.us>
2020-04-18 15:18:15 -05:00
Dan Schaper
36c1e66dc1 Convert regex string to raw.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
2020-04-18 12:48:51 -07:00
Adam Warner
1b5abd4ad6 test
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-04-18 18:46:00 +01:00
Adam Hill
0f73f390a9 Merge branch 'master' of github.com:pi-hole/docker-pi-hole into dev 2020-03-16 17:57:54 -05:00
Adam Hill
e0e6b491c9 Update circle-deploy.sh 2020-03-16 17:57:21 -05:00
Adam Hill
e6a9cd5ce2 Merge pull request #584 from lightswitch05/feature/support-docker-secrets-for-web-password
Support docker secrets for web password
2020-02-27 14:30:16 -06:00
Adam Hill
931aad4cb1 Merge pull request #577 from pi-hole/dev
Dev to Master to release 4.4
2020-02-26 12:24:13 -06:00
Daniel
64892423b6 Added 'WEBPASSWORD_FILE' environment variable to enable support for Docker Secrets.
If 'WEBPASSWORD' is set, 'WEBPASSWORD_FILE' is ignored. If 'WEBPASSWORD' is empty, and 'WEBPASSWORD_FILE' is set to a valid readable file, then 'WEBPASSWORD' will be set to the contents of 'WEBPASSWORD_FILE'.

Signed-off-by: Daniel <daniel@developerdan.com>
2020-02-26 13:13:20 -05:00
Adam Hill
b39a6af9b5 Merge pull request #582 from pi-hole/latest_deploy
Latest deploy
2020-02-26 10:33:36 -06:00
Adam Hill
db919a22cc Back to latest tag
Signed-off-by: Adam Hill <adam@diginc.us>
2020-02-26 10:30:03 -06:00
Adam Hill
d20bde221b Comment + test latest hub tag
Signed-off-by: Adam Hill <adam@diginc.us>
2020-02-26 08:57:38 -06:00
Adam Hill
91ab080476 skip local scope coding, not needed
Signed-off-by: Adam Hill <adam@diginc.us>
2020-02-25 21:56:31 -06:00
Adam Hill
3fb82b0fde typo
Signed-off-by: Adam Hill <adam@diginc.us>
2020-02-25 21:43:54 -06:00
Adam Hill
730ee6952a Try to deploy latest if the circle build matches latest tag
Signed-off-by: Adam Hill <adam@diginc.us>
2020-02-25 21:39:39 -06:00
Dan Schaper
76d2578b77 Merge pull request #581 from pi-hole/v4.4
target core version 4.4
2020-02-25 15:39:19 -08:00
Adam Warner
ca9bf8ce5c This should fix the tests
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-02-25 22:50:38 +00:00
Adam Warner
de7e563ad2 target core version 4.4
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-02-25 20:57:20 +00:00
Adam Hill
d102ba94e5 Merge pull request #579 from lightswitch05/feature/improve-healthcheck-responsiveness
Improve healthcheck responsiveness
2020-02-25 09:24:26 -06:00
Daniel
cf6d74a2be Improve healthcheck responsiveness.
By default, dig will retry 2 times (for a total of 3 attempts) to get a response back. Each attempt defaults to 5 seconds. Before this change, a single docker healtcheck failure would really mean three failures and would take a total of 15 seconds before failing. By default, docker healthchecks will retry 3 times before considering a service unhealhy (with a 30 second interval). Combined with dig retries, this means it would take a total of 9 failed DNS responses before it considers the pihole to be unhealthy. Combining the retry between dig and docker, dig considers it a success if even 1/3 responses are recieved - and docker considers it a success if only 1/3 of those successes are successful. I'm not great at math - and order does make a difference - but I think that means as long as 1/9th of DNS queries are being answered - then docker thinks its healthy. Anyways, long story sort, dig doesn't need to have its own retry logic since docker already has a configuarable retry. I also disable recurse since the goal is to test this specific instance.

Also removed duplicate import statement.

Signed-off-by: Daniel <daniel@developerdan.com>
2020-02-25 08:55:09 -05:00
Adam Warner
80cea505c4 Merge pull request #578 from pi-hole/release-v4.3.4
update for core 4.3.5
2020-02-25 10:22:59 +00:00
Adam Warner
c0c72219a9 Did I say 4.3.4? I spoke too soon
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-02-24 20:18:27 +00:00
Adam Warner
6bf15d6577 update for core 4.3.4
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-02-24 18:05:02 +00:00
Adam Hill
2fdcf19223 Merge pull request #576 from pi-hole/upgrade_v4.3.3
Upgrade v4.3.3
2020-02-24 09:11:53 -06:00
Adam Hill
c024dcd8d9 Upgrade v4.3.3
Also remove ipv6 from tests, validation fails and breaks tests

Signed-off-by: Adam Hill <adam@diginc.us>
2020-02-23 22:33:42 -06:00
Adam Warner
18eb5ffbc8 Set cron time back to midnight, now that we know it works
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-02-17 21:45:06 +00:00
Adam Hill
a378a0f696 Merge pull request #569 from pi-hole/tweak-install
Remove some redundant code from install.sh
2020-02-16 13:16:31 -06:00
Adam Hill
0570d264ed Merge pull request #564 from losuler/dev
Fix minor spelling mistake
2020-02-16 13:01:36 -06:00
Adam Warner
b74f50ba37 remove unnesacery lines from install.sh
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-02-16 17:43:21 +00:00
Adam Warner
31132aa4ec Wild experimentations to see what circle does... 2020-02-16 10:53:49 +00:00
Adam Hill
5367761311 cront soon 2020-02-14 13:15:35 -06:00
Adam Hill
6091299fbf build + nightly build 2020-02-14 13:02:23 -06:00
Adam Hill
f523449d73 filter->filters 2020-02-14 12:58:02 -06:00
Adam Hill
eb683cf043 CI rebuild nightly schedule 2020-02-14 12:56:38 -06:00
Adam Hill
f0a9a9fb04 Merge pull request #565 from scott-kirk/patch-1
Minor spelling mistake in README
2020-02-09 12:46:43 -06:00
Scott Kirkpatrick
bf0a9190c8 Minor spelling mistake in README 2020-02-09 11:19:04 -05:00
losuler
1add81a1ce Fix minor spelling mistake
Signed-off-by: losuler <losuler@users.noreply.github.com>
2020-02-09 17:27:48 +11:00
Назар Ярославович Костецький
8264a46ed5 Merge remote-tracking branch 'origin/dev' into patch-1
Signed-off-by: Назар Ярославович Костецький <silver_925@ukr.net>
2020-02-04 21:30:32 +02:00
Назар Ярославович Костецький
fe545c6bb2 add missing env variables
Fix issue #553
now you can access your pi-hole server externaly

Signed-off-by: Назар Ярославович Костецький <silver_925@ukr.net>
2020-02-04 20:13:17 +02:00
Adam Hill
1dafcb6946 Disable Armel for now 2020-02-04 08:28:22 -06:00
Adam Hill
4c4e9c3bc9 Beta v5.0
Signed-off-by: Adam Hill <adam@diginc.us>
2020-02-03 23:39:03 -06:00
Adam Hill
8bfe96968d Merge pull request #552 from pi-hole/deploy-images-from-ci
CircleCI, CD, Python3, and PipEnv
2020-02-03 15:37:14 -06:00
Adam Hill
aab53102db Delete the unecessary
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-30 20:46:12 -06:00
Adam Hill
1265766b3a finally?
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-30 20:28:06 -06:00
Adam Hill
3765d41b5c Update way too much
- Tox py3.7 + pipenv
- Python3 Dockerfile.py
- Dockerfile.py tags remote instead of just local image names now
- Circle.sh instead of in-line circle.yml script breakout
- probably other stuff I forgot
- Docker images build during the tests should hopefullly now be available at the deploy job workflow thanks to shared docker layers.
- Rename aarch64 to arm64 to reduce custom map
2020-01-30 20:26:57 -06:00
Adam Hill
939d2992f1 Quiet things down
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-14 00:47:04 -06:00
Adam Hill
a92ea9c386 correct todo comment
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-14 00:41:11 -06:00
Adam Hill
d880f69836 Remove manfiest for now, fix namespace
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-14 00:39:57 -06:00
Adam Hill
ea989a78c4 Preparing code for master/tags/latest image
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-14 00:21:36 -06:00
Adam Hill
a615d551a5 remove tox re-running in deploy script
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-14 00:11:09 -06:00
Adam Hill
6995122edd remove dryrun
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-13 23:52:40 -06:00
Adam Hill
ad6c06d075 image and namespace are now defaulted but overridable
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-13 23:47:40 -06:00
Adam Hill
fe3c9d22d5 forget why sudo is needed...
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-04 12:24:26 -06:00
Adam Hill
7d54465eb0 Remove branch, leaving just tags for wf builds to fix?
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-04 12:03:49 -06:00
Adam Hill
1505156bfa fix?
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-03 00:01:35 -06:00
Adam Hill
6ddcd3f716 fix?
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-02 23:58:14 -06:00
Adam Hill
2f2fb40c56 fix?
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-02 23:50:56 -06:00
Adam Hill
c3933ab7ae missing filter key
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-02 23:45:50 -06:00
Adam Hill
5c1503aff5 Merge branch 'dev' of github.com:pi-hole/docker-pi-hole into deploy-images-from-ci
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-02 23:42:14 -06:00
Adam Hill
f34f2ce857 CircleCI deployment take 1
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-02 23:42:04 -06:00
Adam Hill
8d5724e70e Merge pull request #532 from cwilby/patch-1
Fix indenting in docker-compose.yml
2020-01-02 13:45:02 -06:00
Adam Hill
23c4420630 Merge pull request #524 from billimek/add_dns_fqdn_required
Add new optional env variable DNS_FQDN_REQUIRED
2020-01-02 13:38:30 -06:00
Adam Hill
09eae003cf Merge pull request #551 from pi-hole/armel
Armel
2020-01-02 13:37:47 -06:00
Adam Hill
4ba50052a5 re-enable arm 2020-01-01 21:33:38 -06:00
Adam Hill
9c5393dfa0 Merge branch 'dev' of github.com:diginc/docker-pi-hole into armel
Signed-off-by: Adam Hill <adam@diginc.us>
2020-01-01 21:25:53 -06:00
Adam Hill
9c76d246f6 Merge pull request #550 from pi-hole/circleci
Circle CI replacing Travis
2020-01-01 21:25:09 -06:00
Adam Hill
096c6b5848 added armel with manual patch for now
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 21:42:26 -06:00
Adam Hill
8b51f53bfe remove armel for now
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 21:41:31 -06:00
Adam Hill
8ab895b38a bump some versions, remove unused
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 18:02:22 -06:00
Adam Hill
3a0b1b197c upgrade pip
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 17:48:09 -06:00
Adam Hill
3d8fed70e7 updated pip freeze
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 17:45:35 -06:00
Adam Hill
c2bca952a4 forgot requirements.txt
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 17:42:08 -06:00
Adam Hill
0c5468ba29 more command fixes
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 16:57:37 -06:00
Adam Hill
18b1f446ab command typo
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 16:56:08 -06:00
Adam Hill
f23ef9b293 switching to circleci
Signed-off-by: Adam Hill <adam@diginc.us>
2019-12-31 16:53:50 -06:00
Warren Fisher
e92dfcfa38 Revert "Update pytest for travisCI"
This reverts commit fcbe538aa932f7070b655b6ae901670a4216bdef.

Signed-off-by: Warren Fisher <github@warrenfisher.dev>
2019-11-17 16:33:30 -04:00
Warren Fisher
c88f12a351 Update pytest for travisCI
Signed-off-by: Warren Fisher <github@warrenfisher.dev>
2019-11-17 16:33:30 -04:00
Warren Fisher
6e38238dc1 Add to Ubuntu install section
Add info about restarting systemd-resolved

Signed-off-by: Warren Fisher <github@warrenfisher.dev>

Add to Ubuntu install section

Signed-off-by: Warren Fisher <github@warrenfisher.dev>
2019-11-17 16:33:30 -04:00
Cameron Wilby
e74f8c12e4 Update docker-compose.yml 2019-11-12 16:58:04 -08:00
Jeff Billimek
4dffbf031c Add new optional env variable DNS_FQDN_REQUIRED
This new optional env variable will allow control over the 'Never
forward non-FQDNs' advanced DNS setting.

Signed-off-by: Jeff Billimek <jeff@billimek.com>
2019-10-16 00:29:40 -04:00
Mitchel Humpherys
b5356568d5 docker_run.sh: Add env var to specify storage directory
Currently `docker_run.sh` bind-mounts some directories rooted at the
working directory when the script is invoked.  Add an environment variable
so that this storage location can be specified at invocation time without
having to change to a different directory.

Also creates PIHOLE_BASE if it doesn't exist already.
2019-09-30 11:44:40 -07:00
Adam Hill
49ed8a0b2c Merge pull request #513 from pi-hole/v4.3.2-web
v4.3.2 web
2019-09-22 15:03:29 -05:00
Adam Hill
05977b507d Update install.sh 2019-09-22 13:48:36 -05:00
Adam Hill
7a41d55e61 Merge pull request #504 from kaysond/master
Update README.md to include detailed Ubuntu install tips
2019-09-20 21:47:13 -05:00
kaysond
e7174adaf1 Update README.md to include detailed Ubuntu install tips
Signed-off-by: kaysond <kaysond@hotmail.com>
2019-09-20 18:33:02 -07:00
Adam Hill
f38ac6ff0b Merge pull request #511 from pi-hole/dev
v4.3.2 + Dev changes
2019-09-19 23:55:05 -05:00
Adam Hill
17f87be607 wait for returncode
Signed-off-by: Adam Hill <adam@diginc.us>
2019-09-19 00:07:56 -05:00
Adam Hill
658df9e905 comment cleanup
Signed-off-by: Adam Hill <adam@diginc.us>
2019-09-17 23:14:12 -05:00
Adam Hill
aa31e6baf6 Dockerfile.py now live prints docker build output
Signed-off-by: Adam Hill <adam@diginc.us>
2019-09-17 23:06:31 -05:00
Adam Hill
a6e70b653d Upgrade 2019-09-17 22:13:12 -05:00
Adam Hill
e061deee3e Merge branch 'master' of github.com:diginc/docker-pi-hole into dev 2019-09-15 20:23:47 -05:00
Adam Hill
79ecb74140 Merge pull request #481 from danielhoherd/patch-1
Correct inconsistent indentation
2019-09-01 14:21:07 -05:00
Adam Hill
ce2b04e34e Merge pull request #494 from scottsuch/bugfix/fix_docker_compose_example
Tweaks to jwilder-proxy.yml
2019-09-01 14:20:37 -05:00
Adam Hill
1111f81fbf Merge branch 'master' of github.com:diginc/docker-pi-hole into dev 2019-09-01 11:59:35 -05:00
Adam Hill
f057c22649 Merge pull request #498 from ruimarinho/feature/support-additional-env-var-config
Add support for additional env var config
2019-08-31 20:48:52 -05:00
Adam Hill
f4742240c2 Merge pull request #499 from cclauss/modernize-Python-2-codes
Use print() function in both Python 2 and Python 3
2019-08-31 20:46:22 -05:00
Adam Hill
6dcb04d9d6 Merge branch 'master' into modernize-Python-2-codes 2019-08-31 18:48:38 -05:00
Adam Hill
dbd8611288 Merge pull request #500 from cclauss/patch-1
Travis CI: The sudo: tag is deprecated on Travis
2019-08-31 18:48:28 -05:00
Christian Clauss
b135d68b6f Travis CI: The sudo: tag is deprecated on Travis 2019-08-31 22:09:01 +02:00
cclauss
6987b36981 Use print() function in both Python 2 and Python 3
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
2019-08-31 22:07:13 +02:00
Rui Marinho
cec9ffb36b Add support for additional env var config 2019-08-31 19:17:19 +01:00
Scott Gorsuch
47298e7f37 Tweaks to jwilder-proxy.yml
Signed-off-by: Scott Gorsuch <Scott.Gorsuch@blackboard.com>
2019-08-16 10:27:25 -04:00
Adam Hill
c7519e31a2 Merge pull request #492 from alexislefebvre/patch-1
Fix typo s/equivilent/equivalent/
2019-08-13 18:38:28 -05:00
Alexis Lefebvre
226d7239e5 Fix typo s/equivilent/equivalent/ 2019-08-12 00:01:42 +02:00
Daniel
fa044d0129 Correct inconsistent indentation
the contents of `volumes` was indented an extra space.

Signed-off-by: Daniel Hoherd <daniel.hoherd@gmail.com>
2019-07-06 10:09:33 -07:00
Adam Hill
7418b6adee Merge branch 'master' of github.com:diginc/docker-pi-hole into dev
Signed-off-by: Adam Hill <adam@diginc.us>
2019-07-02 00:01:06 -05:00
Adam Hill
4eb10fd63a Merge pull request #480 from pi-hole/v4.3.1-core
v4.3.1 core
2019-07-01 23:56:02 -05:00
Adam Hill
cee3e47550 v4.3.1 core
Signed-off-by: Adam Hill <adam@diginc.us>
2019-07-01 22:48:19 -05:00
Adam Hill
7459a75cac Merge pull request #478 from pi-hole/fix_version_footer
Fix the footer version
2019-06-23 13:31:40 -05:00
Adam Hill
a2b28d03b8 Fix the footer version
Resolves #469

Signed-off-by: Adam Hill <adam@diginc.us>
2019-06-23 12:53:26 -05:00
Adam Hill
f226e090fe Merge pull request #463 from mvaal/jwilder
Correct formatting issues with docker-compose-jwilder-proxy
2019-06-07 07:55:21 -05:00
Adam Hill
0cc62575a7 Merge pull request #472 from pi-hole/revert-451-k8s
Revert 451 k8s

Fixes #465
Fixes #466
Fixes #467
2019-06-01 16:00:21 -05:00
Adam Hill
e5a1a26a4a Merge branch 'master' into revert-451-k8s 2019-06-01 15:40:59 -05:00
Adam Hill
89717949c4 Revert "missed test update"
This reverts commit 20b130a666.
2019-06-01 12:18:10 -05:00
Adam Hill
fd48454649 Revert "initial commit on configdir as volume"
This reverts commit c1fb17a645.

Signed-off-by: Adam Hill <adam@diginc.us>
2019-06-01 12:16:14 -05:00
Marcus Vaal
8fe0d7231e Correct formatting issues with docker-compose-jwilder-proxy
Signed-off-by: Marcus Vaal <mjvaal@gmail.com>
2019-05-30 21:34:25 -05:00
Adam Hill
8607e26f5e Merge pull request #453 from itaykomemy/patch-1
Fix typo in docker_run.sh
2019-05-30 20:16:52 -05:00
Adam Hill
9cf80692d2 Merge pull request #461 from pi-hole/dev
Dev image
2019-05-30 20:15:42 -05:00
Adam Hill
798a27075c Merge branch 'master' into patch-1 2019-05-29 18:55:43 -05:00
Adam Hill
4b6c41f950 Merge pull request #454 from DistractionRectangle/Trim-docker-image
Trim Docker Image
2019-05-29 18:55:29 -05:00
Adam Hill
eebb82bb3f Merge pull request #451 from mabunixda/k8s
Use volume for configuration directory
2019-05-29 18:54:59 -05:00
Martin Buchleitner
09131ad78f Merge branch 'master' into k8s
* master:
  Official tag time
  Docker Pi-hole v4.3
2019-05-28 09:15:08 +02:00
Martin Buchleitner
7c402d329a updated 2019-05-28 09:14:21 +02:00
Martin Buchleitner
a80868209f Merge pull request #1 from pi-hole/master
update 4.3
2019-05-28 07:11:54 +00:00
DistractionRectangle
113da00d0a Update install.sh
Shallow clone pihole and webinterface repos to target branch.
Only install curl and procps dependencies, as well as
ca-certificates for curl'ing against https

Cuts image size down by ~30MB (304MB -> 274MB)

Signed-off-by: DistractionRectangle <48034372+DistractionRectangle@users.noreply.github.com>
2019-05-19 19:19:24 -07:00
Adam Hill
187ba13f73 Merge pull request #440 from pi-hole/release/v4.3
Docker Pi-hole v4.3
2019-05-18 18:36:11 -05:00
Adam Hill
874c4b757b Official tag time
Signed-off-by: Adam Hill <adam@diginc.us>
2019-05-18 18:25:19 -05:00
Itay Komemy
3d76736421 Update docker_run.sh 2019-05-12 23:52:50 +03:00
Martin Buchleitner
20b130a666 missed test update
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Martin Buchleitner
5eab0a9730 initial commit on configdir as volume
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
23f7feff20 Update README.md
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
c7adfe432a Update README.md
Clarify that people running --net=host should set ServerIP for Pi-hole to function correctly.

I'll have to try to add some automation around this later to try to warn only the network host mode users if they miss it.

Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
DK
4f85381d8c Fix typo
Pretty sure 54 is a typo and should be 53.

Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
d8cf7df70b Update README.md
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
c08698c11a Release v4.2.2
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
8ce0aafcd3 Fix #364
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
41289bdd58 No v6 default or validation of the env breaks for non v6 enabled computers
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
de74f56e87 A bunch of readme tweaks
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
bbb770b6c0 disable this trash test
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
fea14ae5a4 sync
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
7da8fa586b does this work any better
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
a4c4de3cf4 maybe
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
fded8bdcc4 show me your secrets
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
49d17bded0 back to using 2 dns
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
fea57446a5 revert to old setup
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
41fc498166 Slow down after setup to try to fix test
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
3e76bbd51f add some more details to ouput to debut travis failure
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
7cb09b78db empty the adlist for tests
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
062f94d0f7 Another flaky test, logs of readme
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
cb463d01d2 Fix default block list install
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
1322db7ec3 Slow down all the flakey tests to pass 100%
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
07bc55786b Fixed tests!
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
397ec03285 remove ServerIP requirement, simpler example commands
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Mathieu Hofman
138e061c17 Allow running pihole-FTL as non-root
- Add a new container environment variable allowing to specify the user to run the pihole-FTL process as. Defaults to root.
- Set inherited capabilities attributes on the pihole-FTL file to automatically grant runtime permitted capabilities when available in the bounding set. This allows dropping root before starting pihole-FTL without failing with a permission error if the capabilities are not available to the container (the process may still error out if performing an operation requiring the capability).
- Add some information on capabilities to the Readme file.

Signed-off-by: Mathieu Hofman <86499+mhofman@users.noreply.github.com>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
b72da80f13 hotfix for bad grep
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
3de08b138e change to calling it dnsmasq user
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
040d9fcee6 v4.2.1 & more robust user root fix
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Adam Hill
f7f6949c53 run FTL as root
Signed-off-by: Adam Hill <adam@diginc.us>
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-09 16:50:18 +02:00
Martin Buchleitner
f950671a1c missed test update
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-08 08:31:42 +02:00
Martin Buchleitner
c1fb17a645 initial commit on configdir as volume
Signed-off-by: Martin Buchleitner <mabunixda@gmail.com>
2019-05-08 08:12:58 +02:00
Adam Hill
e3f42c86f3 Merge branch 'master' into release/v4.3 2019-04-29 21:38:05 -05:00
Adam Hill
cf36276d21 Merge pull request #447 from pi-hole/ServerIP-net-host
Update README.md
2019-04-24 14:02:12 -05:00
Adam Hill
7d36ab2ff9 Update README.md 2019-04-24 13:39:44 -05:00
Adam Hill
5f8b01bce3 Update README.md
Clarify that people running --net=host should set ServerIP for Pi-hole to function correctly.

I'll have to try to add some automation around this later to try to warn only the network host mode users if they miss it.
2019-04-24 13:37:45 -05:00
Adam Hill
346213415d Merge pull request #442 from poldim/patch-1
Fix typo
2019-04-15 12:02:23 -05:00
DK
2a973474fd Fix typo
Pretty sure 54 is a typo and should be 53.
2019-04-15 09:06:29 -07:00
Adam Hill
02e3ead7eb Docker Pi-hole v4.3
Signed-off-by: Adam Hill <adam@diginc.us>
2019-04-11 22:17:26 -05:00
Adam Hill
95a665c057 Update README.md 2019-02-18 14:11:13 -06:00
Adam Hill
99eadced3a Merge pull request #426 from pi-hole/v4.2.2
Release v4.2.2
2019-02-18 13:22:06 -06:00
Adam Hill
e23e0ef5bf Release v4.2.2
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-18 13:14:56 -06:00
Adam Hill
f1f53e7b84 Merge pull request #418 from pi-hole/dev
Docker fixes / updates for 4.2.1
2019-02-18 13:07:31 -06:00
Adam Hill
5dfa5398b8 Fix #364
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-17 00:18:34 -06:00
Adam Hill
669d91dfe3 No v6 default or validation of the env breaks for non v6 enabled computers
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 23:23:26 -06:00
Adam Hill
e5ad7aea55 A bunch of readme tweaks
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 22:06:16 -06:00
Adam Hill
ceda92b0f2 disable this trash test
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 21:01:36 -06:00
Adam Hill
0563a3c795 sync
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 20:05:53 -06:00
Adam Hill
5f36094b21 does this work any better
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 19:55:18 -06:00
Adam Hill
f0e2d705dc maybe
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 00:48:03 -06:00
Adam Hill
ca3fcd6993 show me your secrets 2019-02-14 00:42:05 -06:00
Adam Hill
2040cc5978 back to using 2 dns
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 00:23:42 -06:00
Adam Hill
1ccea93c16 revert to old setup
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-14 00:18:55 -06:00
Adam Hill
9c7b02aba9 Slow down after setup to try to fix test
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-13 23:45:17 -06:00
Adam Hill
ca4fe84df2 add some more details to ouput to debut travis failure
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-13 23:26:21 -06:00
Adam Hill
f9a21d2ff9 empty the adlist for tests
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-12 22:16:15 -06:00
Adam Hill
1685ed342f Another flaky test, logs of readme
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-09 02:08:20 -06:00
Adam Hill
f71ecf0802 Fix default block list install
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-09 00:22:12 -06:00
Adam Hill
236b2f1ed6 Slow down all the flakey tests to pass 100%
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-09 00:09:37 -06:00
Adam Hill
7ecf7c6f28 Fixed tests!
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-08 23:14:48 -06:00
Adam Hill
fca7769b33 remove ServerIP requirement, simpler example commands
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-07 19:51:15 -06:00
Adam Hill
6c3d02f049 Merge pull request #415 from mhofman/master
Allow running pihole-FTL as non-root
2019-02-06 20:08:26 -06:00
Mathieu Hofman
6629aff889 Allow running pihole-FTL as non-root
- Add a new container environment variable allowing to specify the user to run the pihole-FTL process as. Defaults to root.
- Set inherited capabilities attributes on the pihole-FTL file to automatically grant runtime permitted capabilities when available in the bounding set. This allows dropping root before starting pihole-FTL without failing with a permission error if the capabilities are not available to the container (the process may still error out if performing an operation requiring the capability).
- Add some information on capabilities to the Readme file.

Signed-off-by: Mathieu Hofman <86499+mhofman@users.noreply.github.com>
2019-02-06 02:31:33 -08:00
Adam Hill
68d6c343a5 hotfix for bad grep
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-05 00:17:59 -06:00
Adam Hill
607092ed32 Merge pull request #413 from pi-hole/v4.2.1
v4.2.1 & more robust user root fix
2019-02-03 22:08:59 -06:00
Adam Hill
1e2cdba3a3 change to calling it dnsmasq user
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-03 18:37:03 -06:00
Adam Hill
0b8333f7bc v4.2.1 & more robust user root fix
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-03 18:30:51 -06:00
Adam Hill
a522eae6e9 Merge pull request #412 from pi-hole/run_dnsmasq_as_root
run FTL as root
2019-02-03 12:53:45 -06:00
Adam Hill
cf1bb48fa8 run FTL as root
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-03 12:47:41 -06:00
Adam Hill
c3bfdfb5de Merge pull request #411 from pi-hole/production_4.2
switch to production tags
2019-02-03 11:56:41 -06:00
Adam Hill
d6642fc191 broken test (works outside tests), not required for release
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-03 11:45:40 -06:00
Adam Hill
e6e8d0015d Merge branch 'production_4.2' of github.com:diginc/docker-pi-hole into production_4.2 2019-02-03 11:29:07 -06:00
Adam Hill
18de6b3883 install FTL
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-03 11:27:49 -06:00
Adam Hill
f0b8561990 Merge branch 'master' into production_4.2 2019-02-03 10:56:29 -06:00
Adam Hill
7e2986f51c switch to production tags
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-03 10:55:35 -06:00
Adam Hill
7aab18e0a4 Merge pull request #402 from pi-hole/release/v4.2
v4.2 and Version pulled from a file now
2019-02-03 10:54:56 -06:00
Adam Hill
8ece19132d deploy support for RCs, fix enable test
Signed-off-by: Adam Hill <adam@diginc.us>
2019-02-02 12:59:02 -06:00
Adam Hill
d3309ebb1a remove old blocking page setup/test
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-21 22:43:38 -06:00
Adam Hill
38d76d7ec8 fix conftest path to VERSION
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-21 20:37:05 -06:00
Adam Hill
08c2ac2e48 consistent global version var
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-21 00:09:05 -06:00
Adam Hill
440a7a19a5 v4.2 and Version pulled from a file now
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-20 23:59:35 -06:00
Adam Hill
7ec893ae3f Merge pull request #395 from pi-hole/dev
Docker-compose update
2019-01-16 22:42:02 -06:00
Adam Hill
d43675afa3 Merge branch 'master' into dev 2019-01-16 21:50:50 -06:00
Adam Hill
7e21322167 Merge pull request #394 from chapb/patch-1
Update with 4.1.1+ requirement for cap_add
2019-01-16 20:35:48 -06:00
Brennan Chapman
17c185b40a Update with 4.1.1+ requirement for cap_add
Uncommented cap_add as required in 4.1.1+ to start DNS service, not just for DHCP.
2019-01-16 20:51:43 -05:00
Adam Hill
3ba80f1071 Merge pull request #390 from vhp/vincent-extra-sleep
Extend sleep and add env file for usage
2019-01-13 14:44:55 -06:00
Adam Hill
83cd82906d Merge branch 'master' into vincent-extra-sleep 2019-01-13 13:49:37 -06:00
Vincent Perricone
403a205b2a Remove excess bash from Readme
Signed-off-by: Vincent Perricone <vhp@fastmail.fm>
2019-01-13 14:48:27 -05:00
Adam Hill
1c34c2a1ee Fix extra tic in docker run, indendation
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-13 13:47:39 -06:00
Adam Hill
a8e1746476 FTLDNS
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-13 13:02:20 -06:00
Vincent Perricone
98faf1e5f9 Move docker args to bottom for --env-file to put with other Optionals
Signed-off-by: Vincent Perricone <vhp@fastmail.fm>
2019-01-12 22:36:17 -05:00
Vincent Perricone
2c2b8dfab9 Update wording
Signed-off-by: Vincent Perricone <vhp@fastmail.fm>
2019-01-12 22:34:02 -05:00
Vincent Perricone
d25b9adff1 Update gitignore
Signed-off-by: Vincent Perricone <vhp@fastmail.fm>
2019-01-12 22:34:02 -05:00
Vincent Perricone
c9050fef72 Update Readme
Signed-off-by: Vincent Perricone <vhp@fastmail.fm>
2019-01-12 22:34:02 -05:00
Vincent Perricone
5c53f1c26d Updates to docker_run
Signed-off-by: Vincent Perricone <vhp@fastmail.fm>
2019-01-12 22:34:02 -05:00
Adam Hill
a40fcbd990 Merge pull request #389 from pi-hole/Version_fix
Small readme tweaks
2019-01-12 19:35:34 -06:00
Adam Hill
f1f3e35086 Small readme tweaks
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-12 19:34:35 -06:00
Adam Hill
4119893f76 Merge pull request #386 from pi-hole/dev
Readme and startup checks for common issues
2019-01-12 19:26:48 -06:00
Adam Hill
b2aecc497a remove comment mid docker run, it breaks the command
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-12 17:34:34 -06:00
Adam Hill
8d8f990db8 Updating docker_run loop to not run infinitely
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-11 22:23:31 -06:00
Adam Hill
27ed5bdc98 Merge pull request #383 from vhp/vhp-tidy
Tidy up docker run script
2019-01-11 22:13:47 -06:00
Adam Hill
5a0a3dd959 Merge pull request #384 from pi-hole/resolvconf_check_and_docs
Resolvconf check and docs
2019-01-11 10:12:14 -06:00
Adam Hill
c7d9bc7dea Merge branch 'resolvconf_check_and_docs' of github.com:diginc/docker-pi-hole into resolvconf_check_and_docs 2019-01-10 21:20:36 -06:00
Adam Hill
d4a7059bef Merge branch 'dev' of github.com:diginc/docker-pi-hole into resolvconf_check_and_docs 2019-01-10 20:55:15 -06:00
Adam Hill
a7a5ef516b Merge branch 'master' of github.com:diginc/docker-pi-hole into resolvconf_check_and_docs 2019-01-10 20:05:40 -06:00
Adam Hill
f5699865da Merge branch 'master' into resolvconf_check_and_docs 2019-01-10 10:06:32 -06:00
Adam Hill
187a04f501 Update docker_run.sh
Exit on error for things like container name or port conflicts
2019-01-10 10:00:39 -06:00
Adam Hill
547d1f6b9b Merge pull request #374 from cyounkins/dhcp
net=host is the only way to use DHCP
2019-01-10 09:55:38 -06:00
Adam Hill
4a4a2e769f Merge pull request #373 from homdx/master
SELinux policy instruction
2019-01-10 09:52:32 -06:00
Adam Hill
210d272ffe Merge branch 'master' into master 2019-01-10 09:16:36 -06:00
Adam Hill
f3cf5dc858 Adding test and check for resolv.conf
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-10 00:28:39 -06:00
Vincent Perricone
6ab7d727e2 Remove trailing whitespace, cleanup output and add wait to ensure password is printed
Signed-off-by: Vincent Perricone <vhp@fastmail.fm>
2019-01-09 23:15:35 -05:00
Adam Hill
19fee6fa5e README update for 4.1.1 and test improvement
* split out arg fixture to improve grainularity of test overriding
* README points out new arguments that improve likelihood of success

Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-08 21:01:42 -06:00
Adam Hill
aac258ad1c Merge pull request #380 from pi-hole/dev
Disable debug logging & docker logging stdout of pihole-FTL
2019-01-02 23:29:04 -06:00
Adam Hill
a5211510db Adding no-daemon opt back in which works with correct capabilities (NET_ADMIN)
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-01 14:46:34 -06:00
Adam Hill
2336174036 comment tweak
Signed-off-by: Adam Hill <adam@diginc.us>
2019-01-01 14:21:53 -06:00
Adam Hill
d9ca4187b9 new pihole dev 2019-01-01 13:51:33 -06:00
Adam Hill
26e1c82fd0 Merge pull request #377 from pi-hole/dev
Update to v4.1.1
2018-12-29 19:16:21 -06:00
Adam Hill
d0b35cec63 4.1.1
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-24 11:23:17 -06:00
Adam Hill
9a581e0a3e Merge pull request #372 from pi-hole/block_inplace_update
Block inplace updates (again)
2018-12-24 11:11:15 -06:00
Craig Younkins
b792c7df88 Merge branch 'master' into dhcp 2018-12-17 13:28:40 -05:00
Adam Hill
5b3b0009bc Added test to confirm updates are blocked
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-16 12:19:32 -06:00
Adam Hill
319856b52f Merge branch 'master' of github.com:diginc/docker-pi-hole into block_inplace_update
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-16 12:04:19 -06:00
Adam Hill
23e65017c1 Merge pull request #370 from pi-hole/dev
Version 4.1
2018-12-16 01:33:08 -06:00
Adam Hill
1d379d07bd fix hardcoded s6 arch :( woops
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-16 00:25:48 -06:00
Craig Younkins
5ded3accab net=host is the only way to use DHCP
Signed-off-by: Craig Younkins <cyounkins@gmail.com>
2018-12-14 14:22:50 -05:00
Adam Hill
93bc8e3a29 newer version of pytest for travis
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-13 19:51:41 -06:00
Adam Hill
e8b23bc582 Work around docker manifests not properly deleting/updating by removing all local manifest cache
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-13 19:06:02 -06:00
Adam Hill
b3beb91b52 update deploy version to 4.1 and fix broken server test
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-13 18:33:38 -06:00
Adam Hill
b39a2ad69a arm version complained/crashed on no TTY
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-13 18:33:08 -06:00
Adam Hill
62c1fb49ee Merge branch 'dev' of github.com:diginc/docker-pi-hole into dev 2018-12-12 20:43:20 -06:00
Adam Hill
d7a125a706 Version 4.1
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-12 20:43:08 -06:00
homdx
94331af79c SELinux policy instruction 2018-12-12 23:56:35 +03:00
Adam Hill
ed26f5d76c Update install.sh 2018-12-11 14:16:04 -06:00
Adam Hill
d2651d8613 Version 4.1
Signed-off-by: Adam Hill <adam@diginc.us>
2018-12-10 21:29:00 -06:00
Adam Hill
c45bf4c8dd Merge branch 'master' of github.com:diginc/docker-pi-hole into dev 2018-11-12 20:35:19 -06:00
Adam Hill
17cc8a2fb7 Merge pull request #360 from reloxx13/patch-1
readme fix dev docker tag
2018-11-07 19:23:19 -06:00
reloxx13
1b2adcf02c readme fix dev docker tag 2018-11-07 20:58:22 +01:00
Adam Hill
61f701be7a Merge pull request #358 from pi-hole/synology
Synology sudo audit error fix, disable audit in pam modules
2018-10-31 23:42:35 -05:00
Adam Hill
10c44c9374 switch to using pihole/debian-base for pam fix
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-31 22:40:29 -05:00
Adam Hill
b095881d6f Merge pull request #359 from pi-hole/non_gnu_awk_ip_lookup
IPRoute v3 ip lookup
2018-10-31 20:14:29 -05:00
Adam Hill
497ae17bf0 generic iproute output parsing
Fixes #346
Fixes #312
2018-10-31 20:11:18 -05:00
Adam Hill
4907bc533d generic iproute output parsing
Fixes #346
Fixes #312
2018-10-31 20:11:16 -05:00
Adam Hill
a47f278df0 cleanup uncessary build dep stuff
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-30 21:13:34 -05:00
Adam Hill
bceef5e4f6 Merge branch 'master' of github.com:diginc/docker-pi-hole into synology 2018-10-30 00:21:02 -05:00
Adam Hill
88bec8766a fixing synology pam
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-30 00:20:50 -05:00
Adam Hill
0c2ba8f5b2 Merge branch 'development' of github.com:diginc/docker-pi-hole into development
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-27 12:07:04 -05:00
Adam Hill
e87b2ff6f6 Merge pull request #350 from PeterDaveHelloKitchen/improve-Dockerfile
Refactor Dockerfile for smaller and less layer image
2018-10-27 12:04:33 -05:00
Adam Hill
88229a5f26 Merge branch 'development' of github.com:diginc/docker-pi-hole into development
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-27 12:02:23 -05:00
Adam Hill
b931633808 Merge pull request #334 from dhutchison/development
Implemented missing support for DNSMASQ_LISTENING environment variable

Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-27 12:01:48 -05:00
Adam Hill
3870154ae3 Merge pull request #334 from dhutchison/development
Implemented missing support for DNSMASQ_LISTENING environment variable
2018-10-27 12:01:04 -05:00
Adam Hill
ebfb3cda79 Merge pull request #351 from stevenw/patch-1
README.md - fixed typo
2018-10-27 11:59:12 -05:00
Steven
89a7c7f022 README.md - fixed typo 2018-10-25 05:24:26 +00:00
Peter Dave Hello
d25aefbf8d Refactor Dockerfile for smaller and less layer image
Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
2018-10-25 12:05:07 +08:00
Adam Hill
775fa06102 Merge pull request #347 from pi-hole/readme-tweaks
Update README.md
2018-10-21 15:16:09 -05:00
Adam Hill
e995ed2f45 Merge pull request #349 from pi-hole/audit_error_fix
Audit error fix
2018-10-21 15:14:57 -05:00
Adam Hill
cb87448371 Long awaited synology audit error fix ;)
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-21 15:08:30 -05:00
Adam Hill
2d1c515d25 Update README.md 2018-10-20 23:40:16 -05:00
Adam Hill
c290324185 Change password logic completely to avoid any extra debug prints
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-16 19:57:25 -05:00
Adam Hill
f1b34887f8 The debug printing logic was inverted here. Left on without debug enabled, turned off when debug was enabled
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-16 19:14:02 -05:00
Adam Hill
7c12efc851 Merge pull request #343 from pi-hole/development
Development to master
2018-10-16 11:43:48 -05:00
Adam Hill
e410f69f52 Clarify the secondary DNS being optional
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-16 09:19:37 -05:00
Adam Hill
173707fb2d adding more dns setting documentation
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-15 22:35:13 -05:00
Adam Hill
38ab3afae1 deploy script update
Signed-off-by: Adam Hill <adam@diginc.us>
2018-10-15 22:13:58 -05:00
Adam Hill
710f7bff27 Merge branch 'master' of github.com:diginc/docker-pi-hole into development 2018-10-15 22:11:42 -05:00
Adam Hill
6466099ada Merge pull request #338 from mahzilla/add-dns-to-doco-example-yml
Update doco-example.yml with dns flags
2018-10-15 22:08:12 -05:00
Adam Hill
72fc43bd10 Merge branch 'master' into add-dns-to-doco-example-yml 2018-10-15 21:57:21 -05:00
Adam Hill
148fd8579e Merge pull request #339 from theel0ja/patch-1
Added syntax highlighting
2018-10-15 21:57:00 -05:00
Elias Ojala
ecb9ecee37 Added syntax highlighting
Signed-off-by: Elias Ojala <git@eliasojala.me>
2018-10-11 21:02:20 +03:00
Kevin Mah
b249633b5a Update doco-example.yml with dns flags
Signed-off-by: Kevin Mah <mahzilla@gmail.com>
2018-10-10 08:11:59 -07:00
David Hutchison
7515c10a69 Implemented missing support for DNSMASQ_LISTENING environment variable
Signed-off-by: David Hutchison <dhutchison86+github@googlemail.com>
2018-09-29 22:20:33 +01:00
Adam Hill
cf551180e7 explicitely pin debian slim image (no change, just an alias for old image)
Signed-off-by: Adam Hill <adam@diginc.us>
2018-09-24 21:25:00 -05:00
Adam Hill
9f18ae0e4b Merge pull request #332 from pi-hole/fix_password
Fix password
2018-09-18 19:22:56 -05:00
Adam Hill
ca1a8e9117 Merge branch 'development' of github.com:diginc/docker-pi-hole into fix_password 2018-09-18 00:27:09 -05:00
Adam Hill
5bef5f15ff Merge branch 'master' of github.com:diginc/docker-pi-hole into fix_password 2018-09-18 00:26:47 -05:00
Adam Hill
d57adabf0c Merge pull request #322 from zanglang/patch-1
Typo in README.md
2018-09-18 00:25:59 -05:00
Adam Hill
dcd70b62eb Merge branch 'master' into patch-1 2018-09-18 00:25:32 -05:00
Adam Hill
63f2c4ea00 Fixing error with random passwords, null checking moved earlier
Signed-off-by: Adam Hill <adam@diginc.us>
2018-09-18 00:11:26 -05:00
Adam Hill
0dec8ad9f4 Update README.md
Adding Docker Pi-hole to top for SEO
2018-09-10 14:12:45 -05:00
Jerry Chong
cbc650a9aa Update README.md
Fix a minor typo
2018-08-23 16:26:25 +08:00
Adam Hill
5e559df1d0 Merge pull request #317 from pi-hole/development
Development to master
2018-08-15 09:57:01 -05:00
Adam Hill
d7ad16e6d6 removing deprecation
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-14 22:39:03 -05:00
Adam Hill
008bee5d50 Merge pull request #314 from codestation/feature-manifest
Create docker manifest for multiarch support
2018-08-13 23:39:26 -05:00
Adam Hill
375c6605b6 Update deploy_docker.sh
development on same image name & tweak to latest condition
2018-08-13 23:37:15 -05:00
codestation
fcae03a955 create docker manifest for multiarch support 2018-08-12 15:30:40 -05:00
Adam Hill
5eaa3207b7 Merge pull request #307 from pi-hole/dnsmasq-test
Dnsmasq config test
2018-08-10 16:35:41 -05:00
Adam Hill
d1c0ed9bf3 Dnsmasq config test
Exit during container startup if dnsmasq configs have any issues
2018-08-07 15:53:38 -05:00
Adam Hill
bc8e746546 Merge pull request #304 from pi-hole/fix_setting_loss_on_restart
Fix setting loss on restart (4.0)
2018-08-06 09:06:28 -05:00
Adam Hill
96647b1269 Merge branch 'master' into fix_setting_loss_on_restart 2018-08-06 07:48:00 -05:00
Adam Hill
41b1d04100 Do not delete the setting before sourcing the file :}
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-06 07:46:29 -05:00
Adam Hill
625defbf11 Merge pull request #300 from pi-hole/release/v4.0
Release/v4.0
2018-08-06 07:44:35 -05:00
Adam Hill
f8d37693ed Fix regex writing for web, fix deploying latest
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-05 22:23:22 -05:00
Adam Hill
65a1ac7f1e grab version on startup for web footer. 2 tests stablized
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-05 18:20:55 -05:00
Adam Hill
999f02b598 start of fixing race condition by not having test+s6 both run /start.sh
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-05 18:13:25 -05:00
Adam Hill
cb0fffa26f disable armel(broken in 4.0 for now) 2018-08-05 13:18:57 -05:00
Adam Hill
b5c7ab0522 Merge branch 'release/v4.0' of github.com:diginc/docker-pi-hole into release/v4.0 2018-08-05 13:14:45 -05:00
Adam Hill
22ea5e77b4 Use new v4 prod tags, scrub old dev install code
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-05 13:14:00 -05:00
Adam Hill
7cbb8d1434 Merge branch 'master' into release/v4.0 2018-08-05 12:55:20 -05:00
Adam Hill
b7e813cadc Merge branch 'master' of github.com:diginc/docker-pi-hole into release/v4.0 2018-08-05 12:54:57 -05:00
Adam Hill
797a9213e4 Adding helpful comment for copy paste to Dockerhub/Store
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 19:46:12 -05:00
Adam Hill
c56385ad49 remove multiarch and comments from readme (dockerhub does not high comments)
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 19:43:05 -05:00
Adam Hill
5cc28d769a Updated deploy script (still needs work), fixed dead link
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 19:33:45 -05:00
Adam Hill
20e8ce208c quick fix to web password regression, probably not greatest fix but it works
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 16:19:11 -05:00
Adam Hill
119999be71 Fix web password corruption
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 15:58:05 -05:00
Adam Hill
4dc3c7e2dc Merge pull request #302 from pi-hole/repo_naming_changes
Repo naming changes
2018-08-04 15:38:37 -05:00
Adam Hill
5ee2cc947c Better writing for second half of 443 sinkhold section
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 15:17:06 -05:00
Adam Hill
1c063a6619 change password interactively to avoid leaving bash history
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 15:08:24 -05:00
Adam Hill
df63b3ee12 image to top, links fix, better writing for 443 sinkhole
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 15:04:35 -05:00
Adam Hill
3c135774d3 image to html the same as main repo's
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 14:55:08 -05:00
Adam Hill
c8d7abed1b image, theirs=ours, dockers=docker containers
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 14:52:08 -05:00
Adam Hill
a257be134d Typo, "Pi-hole" consistantly
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 14:43:56 -05:00
Adam Hill
7b06920cd0 travis link fix
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 14:36:34 -05:00
Adam Hill
1f49971046 multiarch reference removed
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 14:34:26 -05:00
Adam Hill
a4296416b0 readme updates
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 14:28:33 -05:00
Adam Hill
65ecba6705 updated script for new names
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 14:24:44 -05:00
Adam Hill
80d5b9dbc1 Test image name updates, passing locally. reorg Dockerfile to build fast, starting on new deploy
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 13:31:58 -05:00
Adam Hill
6e15abd002 more readme old debian tags
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 12:06:51 -05:00
Adam Hill
5b1e992d66 missed one file
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 11:53:12 -05:00
Adam Hill
805c5ccdb7 more /diginc/ references updated
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 11:44:24 -05:00
Adam Hill
73f05e6d35 A bunch of name changes
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 11:40:37 -05:00
Adam Hill
187c1d3f29 stop using pihole init.d stop, may be going away
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 10:30:51 -05:00
Adam Hill
ae16d39016 note about armel
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-04 10:07:10 -05:00
Adam Hill
e7ae12a94c Add fixes for config permissions, deprection notice 2018-08-02 22:50:01 -05:00
Adam Hill
e7f5433d98 Checkout to the new release branch not old FTLDNS one
Signed-off-by: Adam Hill <adam@diginc.us>
2018-08-01 19:15:35 -05:00
Adam Hill
c7d775a82a switch branch to release/v4.0
Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-30 22:29:36 -05:00
Adam Hill
468470b7b5 Added setup_blocklists, other cleanup
* Removed some old switch statements from alpine no longer required
* Limit parallel tests to 2 to help prevent test failure caused by race condition starting parallel tests/containers
* Began introducing a new ENV NO_SETUP to skip the majority of startup script 'setup' functions eventually

Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-29 18:17:54 -05:00
Adam Hill
0e7ab463fa add finish scripts to restart cleanly
Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-19 22:57:05 -05:00
Adam Hill
520669a6b9 merge in dev/master armel goodies 2018-07-19 22:18:34 -05:00
Adam Hill
478b98c503 Merge branch 'dev' of github.com:diginc/docker-pi-hole into prerelease
Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-17 19:44:34 -05:00
Adam Hill
4bd9def800 Merge pull request #288 from diginc/dev
Release dev fixes to production.
2018-07-17 18:19:40 -05:00
Adam Hill
20e8843a97 Merge pull request #296 from diginc/armel
Armv6/Armel architecture image
2018-07-17 14:29:45 -05:00
Adam Hill
8fd2a02d52 Update .travis.yml 2018-07-17 12:47:01 -05:00
Adam Hill
9a680e95ac may as well remove OS from Dockerfile.py
Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-16 23:59:52 -05:00
Adam Hill
43aa8f45d8 armel readme update
Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-16 23:54:52 -05:00
Adam Hill
ec8f441df3 Update the deploy arm to work...better
Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-16 23:54:20 -05:00
Adam Hill
c17cd37eca armel build script and dockerfile stuffs
Signed-off-by: Adam Hill <adam@diginc.us>
2018-07-16 23:43:55 -05:00
Adam Hill
e56b5eda00 small tweak to deploy_arm 2018-07-12 11:36:50 -05:00
Adam Hill
bb3885a15b Update the deploy arm to work...better 2018-07-12 11:34:47 -05:00
Adam Hill
e14b742649 Merge branch 'dev' of github.com:diginc/docker-pi-hole into prerelease 2018-07-12 11:12:27 -05:00
Adam Hill
f770df9504 Merge pull request #293 from diginc/more_ports
More ports
2018-07-11 14:04:40 -05:00
diginc
89a556f858 add ports to jwilder example 2018-07-10 23:31:04 -05:00
diginc
bd925db871 add ports to basic doco example 2018-07-10 23:25:13 -05:00
diginc
10f948fca0 adding ports to traefik example 2018-07-10 23:22:39 -05:00
diginc
70acf54c2c Merge branch 'dev' of github.com:diginc/docker-pi-hole into prerelease 2018-07-10 23:16:40 -05:00
diginc
1b96d7e760 Merge branch 'dev' of github.com:diginc/docker-pi-hole into more_ports 2018-07-10 23:14:27 -05:00
Adam Hill
3afc1d43ff Merge pull request #290 from StefanSchoof/SingleDns
allow no for DNS2
2018-07-10 23:14:19 -05:00
diginc
6364640d4f readme updates 2018-07-10 23:11:44 -05:00
diginc
1a30cb7e7b ports for QNAP and other expose metadata utilizing things 2018-07-10 21:56:59 -05:00
StefanSchoof
3171feef4c allow no for DNS2 2018-07-06 08:01:41 +00:00
diginc
cd6f2790bd Merge branch 'dev' of github.com:diginc/docker-pi-hole into dev 2018-07-05 20:51:20 -05:00
diginc
3877a171da fix startup 53 port conflict and test error 2018-07-04 14:11:18 -05:00
diginc
ad6b4be403 Fixes to the startup, services, and dnsmasq references 2018-07-03 00:19:01 -05:00
diginc
041ef30d42 Merge remote-tracking branch 'origin/dev' into prerelease 2018-07-02 20:50:51 -05:00
diginc
d45bccf9b4 remove dnsmasq service for new pihole-FTL service 2018-07-02 20:50:31 -05:00
Adam Hill
3a4cf40473 Merge pull request #287 from StefanSchoof/failOnError
Fail container on error in start.sh
2018-07-02 14:13:45 -05:00
StefanSchoof
002c8349d2 remove extra set from debugging 2018-07-02 18:18:01 +00:00
StefanSchoof
4ff219b5b8 Fail container on error in start.sh 2018-07-02 11:45:39 +00:00
diginc
60bd77f586 Add in install option for FTLDNS 2018-06-30 17:16:16 -05:00
diginc
3bf7992e52 Merge branch 'master' of github.com:diginc/docker-pi-hole into dev 2018-06-30 11:38:10 -05:00
Adam Hill
6eabd15cd1 Merge pull request #285 from alefchak/dev
Fixed malformed lighthttpd.conf when using host networking and setting WEB_PORT. Fixes #247
2018-06-23 12:16:48 -05:00
Andrew Lefchak
af1816b7e5 Fixed malformed lighthttpd.conf when using host networking and setting WEB_PORT. Fixes #247 2018-06-23 00:04:08 -04:00
Adam Hill
8e2889ba56 Merge pull request #270 from nxadm/master
typo
2018-05-08 16:36:46 -05:00
Claudio Ramirez
d12a876f8f typo 2018-05-08 21:07:50 +02:00
Adam Hill
a050918a5f Merge pull request #269 from nxadm/master
Safe workaround for slow loading pages (scripts that make SSL connections to blocked domains)
2018-05-08 11:53:31 -05:00
Claudio Ramirez
e10a200d70 fmt 2018-05-04 17:17:53 +02:00
Claudio Ramirez
17b3781dd4 Safe workaround for slow loading pages (scripts that make SSL connections to blocked domains) 2018-05-04 17:16:49 +02:00
Adam Hill
9948388656 Merge pull request #266 from diginc/fix_ipv6_lookup
fix IP V6 lookup
2018-04-24 19:44:52 -05:00
Adam Hill
aaad7c8981 Update README.md 2018-04-21 12:47:22 -05:00
Adam Hill
225332b977 fix_ipv6_lookup
Forgot to add the lookup fix from https://github.com/diginc/docker-pi-hole/issues/199#issuecomment-372462890
2018-04-21 12:42:13 -05:00
Adam Hill
a51261ae16 Merge pull request #263 from Raqbit/dev
Fix docker-compose.yml symlink
2018-04-12 11:30:38 -05:00
Raqbit
6813831883 Fix docker-compose.yml symlink 2018-04-12 17:06:39 +02:00
115 changed files with 2500 additions and 1701 deletions

View File

@@ -1 +0,0 @@
**/*.sw*

View File

@@ -1,52 +0,0 @@
<!-- Provide a general summary of the issue in the Title above -->
<!-- Note: these are comments that don't show up in the actual issue, no need to delete them as you fill out the template -->
This is a... <!-- To choose ONE, put an [x] in the box that applies -->
- [ ] Request for a new or modified feature
- [ ] Issue trying to run the docker image
- [ ] Issue trying to build / test / develop the docker image
## Description
<!-- Provide a more detailed introduction to the issue or feature -->
## Expected Behavior
<!-- Tell us what should happen -->
## Actual Behavior
<!-- Tell us what happens instead -->
## Possible Fix
<!-- Not obligatory, but suggest a fix or reason for the bug -->
## Steps to Reproduce and debugging done
<!-- Reproduce this bug. Include code to reproduce, if relevant -->
e.g. your docker run command, pages to visit, CLI commands you ran
1.
2.
3.
4.
## Debug steps I have tried
<!-- Please attempt these debug steps to see if it helps you resolve or understand your own issue -->
- [ ] I have tried destroying my container instance, pulling the newest image version, and re-creating a new container
- [ ] I have tried running the nearly stock `docker run` example in the readme (removing any customizations I added)
- [ ] I have tried running without my volume data mounts to eliminate volumes as the cause
- [ ] I have searched this repository for existing issues and pull requests that look similar <!-- Add links below! -->
<!-- Note: If volumes are your issue, I strongly recommend just starting with fresh volume data -->
<!-- Add any other debugging steps you've taken that maybe relevant information -->
## Context and extra information
<!-- How has this bug affected you? What were you trying to accomplish? -->
<!-- Got any other relevant links to similar issues? -->
## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Docker Host Operating System and OS Version:
* Docker Version:
* Hardware architecture: <!-- ARMv7, x86 -->

57
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,57 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
<!-- Provide a general summary of the issue in the Title above -->
<!-- Note: these are comments that don't show up in the actual issue, no need to delete them as you fill out the template -->
<!-- IMPORTANT Complete the entire template please, the info gathered here is usually needed to debug issues anyway so it saves time in the long run. Incomplete/stock template issues may be closed -->
<!-- pick ONE: Bug,
Feature Request,
Run Issue (running Pi-hole container failing),
Build Issue (Building image failing)
Enter in line below: -->
This is a: **FILL ME IN**
## Details
<!-- Provide a more detailed introduction to the issue or feature, try not to duplicate info from lower sections by reviewing the entire template first -->
## Related Issues
- [ ] I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar
<!-- Add links below! -->
<!------- FEATURE REQUESTS CAN STOP FILLING IN TEMPLATE HERE -------->
<!------- ISSUES SHOULD FILL OUT REMAINDER OF TEMPLATE -------->
## How to reproduce the issue
1. Environment data
* Operating System: **ENTER HERE** <!-- Debian, Ubuntu, Rasbian, etc -->
* Hardware: <!-- PC, RasPi B/2B/3B/4B, Mac, Synology, QNAP, etc -->
* Kernel Architecture: <!-- x86/amd64, ArmV7, ArmV8 32bit, ArmV8 64bit, etc -->
* Docker Install Info and version:
- Software source: <!-- official docker-ce, OS provided package, Hypriot -->
- Supplimentary Software: <!-- synology, portainer, etc -->
* Hardware architecture: <!-- ARMv7, x86 -->
2. docker-compose.yml contents, docker run shell command, or paste a screenshot of any UI based configuration of containers here
3. any additional info to help reproduce
## These common fixes didn't work for my issue
<!-- IMPORTANT! Help me help you! Ordered with most common fixes first. -->
- [ ] I have tried removing/destroying my container, and re-creating a new container
- [ ] I have tried fresh volume data by backing up and moving/removing the old volume data
- [ ] I have tried running the stock `docker run` example(s) in the readme (removing any customizations I added)
- [ ] I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
- [ ] I have tried running without my volume data mounts to eliminate volumes as the cause
If the above debugging / fixes revealed any new information note it here.
Add any other debugging steps you've taken or theories on root cause that may help.

12
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
blank_issues_enabled: false
contact_links:
- name: Questions and Configurations
url: https://discourse.pi-hole.net
about: Ask a question or get help with configurations.
- name: Feature Requests
url: https://discourse.pi-hole.net/c/feature-requests/8
about: See existing Feature Requests and suggest new ones.
- name: Documentation
url: https://docs.pi-hole.net
about: Documentation and guides.

View File

@@ -1,3 +1,5 @@
`{Please select 'base: dev' as target branch above! (you can delete this line)}`
<!--- Provide a general summary of your changes in the Title above -->
## Description

2
.github/dco.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
require:
members: false

12
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: saturday
time: "10:00"
target-branch: dev
reviewers:
- "pi-hole/docker-maintainers"

7
.github/release.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
changelog:
exclude:
labels:
- internal
authors:
- dependabot
- github-actions

18
.github/workflows/codespell.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Codespell
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
spell-check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Spell-Checking
uses: codespell-project/actions-codespell@master
with:
ignore_words_file: .codespellignore

26
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Mark stale issues
on:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 5
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
stale-issue-label: 'stale'
exempt-issue-labels: 'pinned, Fixed in next release, bug, never-stale, documentation, investigating'
exempt-all-issue-assignees: true
operations-per-run: 300
close-issue-reason: 'not_planned'

27
.github/workflows/sync-back-to-dev.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Sync Back to Development
on:
push:
branches:
- master
jobs:
sync-branches:
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Opening pull request
id: pull
uses: tretuna/sync-branches@1.4.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FROM_BRANCH: 'master'
TO_BRANCH: 'dev'
- name: Label the pull request to ignore for release note generation
uses: actions-ecosystem/action-add-labels@v1
with:
labels: internal
repo: ${{ github.repository }}
number: ${{ steps.pull.outputs.PULL_REQUEST_NUMBER }}

83
.github/workflows/test-and-build.yaml vendored Normal file
View File

@@ -0,0 +1,83 @@
name: Test & Build
on:
schedule:
- cron: '0 2 * * *'
push:
branches:
- dev
pull_request:
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Tests
run: |
echo "Building image to test"
./build-and-test.sh
build-and-publish:
if: github.event_name != 'pull_request'
# If only readme has been touched, for example, then the `test` job will have been skipped. This job will therefore be skipped, too.
needs: test
runs-on: ubuntu-latest
steps:
-
name: Checkout
if: github.event_name != 'schedule'
uses: actions/checkout@v3
-
name: Checkout dev branch if we are building nightly
if: github.event_name == 'schedule'
uses: actions/checkout@v3
with:
ref: dev
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: |
${{ secrets.DOCKERHUB_NAMESPACE }}/pihole
ghcr.io/${{ github.repository_owner }}/pihole
flavor: |
latest=${{ startsWith(github.ref, 'refs/tags/') }}
tags: |
type=schedule
type=ref,event=branch,enable=${{ github.event_name != 'schedule' }}
type=ref,event=tag
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: ./src/
platforms: linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm/v6
build-args: |
PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

8
.gitignore vendored
View File

@@ -3,8 +3,16 @@
.cache
__pycache__
.tox
.pipenv
.eggs
UNKNOWN.egg-info
.env
ci-workspace
.gh-workspace
docker-compose.yml
etc-dnsmasq.d/
etc-pihole/
var-log/
# WIP/test stuff
doco.yml

View File

@@ -1,23 +0,0 @@
sudo: required
services:
- docker
language: python
env:
global:
- QEMU_VER=v2.9.1
matrix:
- OS=debian ARCH=amd64
- OS=debian ARCH=armhf
- OS=debian ARCH=aarch64
python:
- "2.7"
install:
- pip install -r requirements.txt
script:
# prepare qemu
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
# generate and build dockerfile
- ./Dockerfile.py --os=${OS} --arch=${ARCH} -v
- docker images
# run docker build & tests
- py.test -vv -n auto -k "${OS}-${ARCH}" ./test/

5
CHANGELOG.md Normal file
View File

@@ -0,0 +1,5 @@
# Docker Pi-Hole changelog
Notes about releases will be documented on [docker-pi-hole's github releases page](https://github.com/pi-hole/docker-pi-hole/releases). Breaking changes will be copied to the top of the docker repo's README file to assist with common upgrade issues.
See the [Pi-hole releases](https://github.com/pi-hole/pi-hole/releases) for details on updates unrelated to docker image releases

View File

@@ -6,5 +6,5 @@ Please review the following before opening a pull request (PR) to help your PR g
* To ensure proper testing and quality control, target any code change pull requests against `dev` branch.
* Make sure the tests pass
* Take a look at [TESTING.md](TESTING.md) to see how to run tests locally so you do not have to push all your code to a PR and have travis-ci run it.
* Take a look at [TESTING.md](test/TESTING.md) to see how to run tests locally so you do not have to push all your code to a PR and have GitHub Actions run it.
* Your tests will probably run faster locally and you get a faster feedback loop.

View File

@@ -1,125 +0,0 @@
#!/usr/bin/env python
""" Dockerfile.py - generates and build dockerfiles
Usage:
Dockerfile.py [--os=<os> ...] [--arch=<arch> ...] [-v] [--no-build | --no-generate] [--no-cache]
Options:
--no-build Skip building the docker images
--no-cache Build without using any cache data
--no-generate Skip generating Dockerfiles from template
--os=<os> What OS(s) to build [default: debian]
--arch=<arch> What Architecture(s) to build [default: amd64 armhf aarch64]
-v Print docker's command output [default: False]
Examples:
"""
from docopt import docopt
from jinja2 import Environment, FileSystemLoader
from docopt import docopt
import os
import testinfra
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
base_vars = {
'name': 'diginc/pi-hole',
'maintainer' : 'adam@diginc.us',
's6_version' : 'v1.21.2.2',
}
os_base_vars = {
'debian': {
'php_env_config': '/etc/lighttpd/conf-enabled/15-fastcgi-php.conf',
'php_error_log': '/var/log/lighttpd/error.log'
},
}
images = {
'debian': [
{
'base': 'debian:stretch',
'arch': 'amd64'
},
{
'base': 'multiarch/debian-debootstrap:armhf-stretch-slim',
'arch': 'armhf'
},
{
'base': 'multiarch/debian-debootstrap:arm64-stretch-slim',
'arch': 'aarch64'
}
]
}
def generate_dockerfiles(args):
if args['--no-generate']:
print " ::: Skipping Dockerfile generation"
return
for os, archs in images.iteritems():
for image in archs:
if os not in args['--os'] and image['arch'] not in args['--arch']:
return
merged_data = dict(
{ 'os': os }.items() +
base_vars.items() +
os_base_vars[os].items() +
image.items()
)
j2_env = Environment(loader=FileSystemLoader(THIS_DIR),
trim_blocks=True)
template = j2_env.get_template('Dockerfile.template')
dockerfile = 'Dockerfile_{}_{}'.format(os, image['arch'])
with open(dockerfile, 'w') as f:
f.write(template.render(pihole=merged_data))
def build_dockerfiles(args):
if args['--no-build']:
print " ::: Skipping Dockerfile building"
return
for os in args['--os']:
for arch in args['--arch']:
docker_repo = 'pi-hole-multiarch'
if arch == 'amd64':
docker_repo = 'pi-hole'
build(docker_repo, os, arch, args)
def build(docker_repo, os, arch, args):
run_local = testinfra.get_backend(
"local://"
).get_module("Command").run
dockerfile = 'Dockerfile_{}_{}'.format(os, arch)
repo_tag = '{}:{}_{}'.format(docker_repo, os, arch)
cached_image = '{}/{}'.format('diginc', repo_tag)
no_cache = ''
if args['--no-cache']:
no_cache = '--no-cache'
build_command = 'docker build {no_cache} --pull --cache-from="{cache},{create_tag}" -f {dockerfile} -t {create_tag} .'\
.format(no_cache=no_cache, cache=cached_image, dockerfile=dockerfile, create_tag=repo_tag)
print " ::: Building {} into {}".format(dockerfile, repo_tag)
if args['-v']:
print build_command, '\n'
build_result = run_local(build_command)
if args['-v']:
print build_result.stdout
if build_result.rc != 0:
print " ::: Building {} encountered an error".format(dockerfile)
print build_result.stderr
assert build_result.rc == 0
if __name__ == '__main__':
args = docopt(__doc__, version='Dockerfile 0.1')
# print args
generate_dockerfiles(args)
build_dockerfiles(args)

View File

@@ -1,48 +0,0 @@
FROM {{ pihole.base }}
LABEL image="{{ pihole.name }}:{{ pihole.os }}_{{ pihole.arch }}"
LABEL maintainer="{{ pihole.maintainer }}"
LABEL url="https://www.github.com/diginc/docker-pi-hole"
ENV TAG {{ pihole.os }}
ENV ARCH {{ pihole.arch }}
ENV PATH /opt/pihole:${PATH}
COPY install.sh /usr/local/bin/docker-install.sh
ENV setupVars /etc/pihole/setupVars.conf
ENV PIHOLE_INSTALL /tmp/ph_install.sh
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/{{ pihole.s6_version }}/s6-overlay-{{ pihole.arch }}.tar.gz
RUN apt-get update && \
apt-get install -y wget curl net-tools cron procps && \
curl -L -s $S6OVERLAY_RELEASE \
| tar xvzf - -C / && \
docker-install.sh && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
ENTRYPOINT [ "/s6-init" ]
ADD s6/{{ pihole.os }}-root /
COPY s6/service /usr/local/bin/service
# php config start passes special ENVs into
ENV PHP_ENV_CONFIG '{{ pihole.php_env_config }}'
ENV PHP_ERROR_LOG '{{ pihole.php_error_log }}'
COPY ./start.sh /
COPY ./bash_functions.sh /
# IPv6 disable flag for networks/devices that do not support it
ENV IPv6 True
EXPOSE 53 53/udp
EXPOSE 80
ENV S6_LOGGING 0
ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
SHELL ["/bin/bash", "-c"]

View File

@@ -1,48 +0,0 @@
FROM multiarch/debian-debootstrap:arm64-stretch-slim
LABEL image="diginc/pi-hole:debian_aarch64"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/diginc/docker-pi-hole"
ENV TAG debian
ENV ARCH aarch64
ENV PATH /opt/pihole:${PATH}
COPY install.sh /usr/local/bin/docker-install.sh
ENV setupVars /etc/pihole/setupVars.conf
ENV PIHOLE_INSTALL /tmp/ph_install.sh
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-aarch64.tar.gz
RUN apt-get update && \
apt-get install -y wget curl net-tools cron procps && \
curl -L -s $S6OVERLAY_RELEASE \
| tar xvzf - -C / && \
docker-install.sh && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /
COPY s6/service /usr/local/bin/service
# php config start passes special ENVs into
ENV PHP_ENV_CONFIG '/etc/lighttpd/conf-enabled/15-fastcgi-php.conf'
ENV PHP_ERROR_LOG '/var/log/lighttpd/error.log'
COPY ./start.sh /
COPY ./bash_functions.sh /
# IPv6 disable flag for networks/devices that do not support it
ENV IPv6 True
EXPOSE 53 53/udp
EXPOSE 80
ENV S6_LOGGING 0
ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
SHELL ["/bin/bash", "-c"]

View File

@@ -1,48 +0,0 @@
FROM debian:stretch
LABEL image="diginc/pi-hole:debian_amd64"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/diginc/docker-pi-hole"
ENV TAG debian
ENV ARCH amd64
ENV PATH /opt/pihole:${PATH}
COPY install.sh /usr/local/bin/docker-install.sh
ENV setupVars /etc/pihole/setupVars.conf
ENV PIHOLE_INSTALL /tmp/ph_install.sh
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-amd64.tar.gz
RUN apt-get update && \
apt-get install -y wget curl net-tools cron procps && \
curl -L -s $S6OVERLAY_RELEASE \
| tar xvzf - -C / && \
docker-install.sh && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /
COPY s6/service /usr/local/bin/service
# php config start passes special ENVs into
ENV PHP_ENV_CONFIG '/etc/lighttpd/conf-enabled/15-fastcgi-php.conf'
ENV PHP_ERROR_LOG '/var/log/lighttpd/error.log'
COPY ./start.sh /
COPY ./bash_functions.sh /
# IPv6 disable flag for networks/devices that do not support it
ENV IPv6 True
EXPOSE 53 53/udp
EXPOSE 80
ENV S6_LOGGING 0
ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
SHELL ["/bin/bash", "-c"]

View File

@@ -1,48 +0,0 @@
FROM multiarch/debian-debootstrap:armhf-stretch-slim
LABEL image="diginc/pi-hole:debian_armhf"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/diginc/docker-pi-hole"
ENV TAG debian
ENV ARCH armhf
ENV PATH /opt/pihole:${PATH}
COPY install.sh /usr/local/bin/docker-install.sh
ENV setupVars /etc/pihole/setupVars.conf
ENV PIHOLE_INSTALL /tmp/ph_install.sh
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-armhf.tar.gz
RUN apt-get update && \
apt-get install -y wget curl net-tools cron procps && \
curl -L -s $S6OVERLAY_RELEASE \
| tar xvzf - -C / && \
docker-install.sh && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /
COPY s6/service /usr/local/bin/service
# php config start passes special ENVs into
ENV PHP_ENV_CONFIG '/etc/lighttpd/conf-enabled/15-fastcgi-php.conf'
ENV PHP_ERROR_LOG '/var/log/lighttpd/error.log'
COPY ./start.sh /
COPY ./bash_functions.sh /
# IPv6 disable flag for networks/devices that do not support it
ENV IPv6 True
EXPOSE 53 53/udp
EXPOSE 80
ENV S6_LOGGING 0
ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
SHELL ["/bin/bash", "-c"]

335
README.md
View File

@@ -1,134 +1,266 @@
## Important Note to alpine / arm tag users:
# Docker Pi-hole
**Debian is now the only supported base OS for `diginc/pi-hole`** to improve consistency and updates. Alpine OS was dropped and ARM has moved to a new image/tag name. The ARM Debian tag was removed from `diginc/pi-hole` but is still supported at its new image repository home, [diginc/pi-hole-multiarch](https://hub.docker.com/r/diginc/pi-hole-multiarch/tags/) where it has both an `:debian_armhf` and `:debian_aarch64` version
<p align="center">
<a href="https://pi-hole.net"><img src="https://pi-hole.github.io/graphics/Vortex/Vortex_with_text.png" width="150" height="255" alt="Pi-hole"></a><br/>
</p>
<!-- Delete above HTML and insert markdown for dockerhub : ![Pi-hole](https://pi-hole.github.io/graphics/Vortex/Vortex_with_text.png) -->
## Upgrade Notes
- **Using Watchtower? See the [Note on Watchtower](#note-on-watchtower) at the bottom of this readme**
- Due to [a known issue with Docker and libseccomp <2.5](https://github.com/moby/moby/issues/40734), you may run into issues running `2022.04` and later on host systems with an older version of `libseccomp2` ([Such as Debian/Raspbian buster or Ubuntu 20.04](https://pkgs.org/download/libseccomp2), and maybe [CentOS 7](https://pkgs.org/download/libseccomp)).
The first recommendation is to upgrade your host OS, which will include a more up to date (and fixed) version of `libseccomp`.
_If you absolutely cannot do this, some users [have reported](https://github.com/pi-hole/docker-pi-hole/issues/1042#issuecomment-1086728157) success in updating `libseccomp2` via backports on debian, or similar via updates on Ubuntu. You can try this workaround at your own risk_ (Note, you may also find that you need the latest `docker.io` (more details [here](https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/))
- Some users [have reported issues](https://github.com/pi-hole/docker-pi-hole/issues/963#issuecomment-1095602502) with using the `--privileged` flag on `2022.04` and above. TL;DR, don't use that mode, and be [explicit with the permitted caps](https://github.com/pi-hole/docker-pi-hole#note-on-capabilities) (if needed) instead
- As of `2022.04.01`, setting `CAP_NET_ADMIN` is only required if you are using Pi-hole as your DHCP server. The container will only try to set caps that are explicitly granted (or natively available)
- In `2022.01` and later, the default `DNSMASQ_USER` has been changed to `pihole`, however this may cause issues on some systems such as Synology, see Issue [#963](https://github.com/pi-hole/docker-pi-hole/issues/963) for more information.
If the container won't start due to issues setting capabilities, set `DNSMASQ_USER` to `root` in your environment.
## Quick Start
1. Copy docker-compose.yml.example to docker-compose.yml and update as needed. See example below:
[Docker-compose](https://docs.docker.com/compose/install/) example:
```yaml
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "80:80/tcp"
environment:
TZ: 'America/Chicago'
# WEBPASSWORD: 'set a secure password here or it will be random'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
restart: unless-stopped
```
2. Run `docker compose -f docker-compose.yml up -d` to build and start pi-hole
3. Use the Pi-hole web UI to change the DNS settings *Interface listening behavior* to "Listen on all interfaces, permit all origins", if using Docker's default `bridge` network setting. (This can also be achieved by setting the environment variable `DNSMASQ_LISTENING` to `all`)
[Here is an equivalent docker run script](https://github.com/pi-hole/docker-pi-hole/blob/master/examples/docker_run.sh).
## Overview
A [Docker](https://www.docker.com/what-docker) project to make a lightweight x86 ~~and ARM~~ container with [pi-hole](https://pi-hole.net) functionality.
A [Docker](https://www.docker.com/what-docker) project to make a lightweight x86 and ARM container with [Pi-hole](https://pi-hole.net) functionality.
1) Install docker for your [x86-64 system](https://www.docker.com/community-edition) or [ARMv6l/ARMv7 system](https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/) using those links.
2) Use the appropriate tag (x86 can use default tag, ARM users need to use images from `diginc/pi-hole-multiarch:debian_armhf`) in the below `docker run` command
1) Install docker for your [x86-64 system](https://www.docker.com/community-edition) or [ARMv7 system](https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/) using those links. [Docker-compose](https://docs.docker.com/compose/install/) is also recommended.
2) Use the above quick start example, customize if desired.
3) Enjoy!
[![Build Status](https://api.travis-ci.org/diginc/docker-pi-hole.svg?branch=master)](https://travis-ci.org/diginc/docker-pi-hole) [![Docker Stars](https://img.shields.io/docker/stars/diginc/pi-hole.svg?maxAge=604800)](https://store.docker.com/community/images/diginc/pi-hole) [![Docker Pulls](https://img.shields.io/docker/pulls/diginc/pi-hole.svg?maxAge=604800)](https://store.docker.com/community/images/diginc/pi-hole)
[![Build Status](https://github.com/pi-hole/docker-pi-hole/workflows/Test%20&%20Build/badge.svg)](https://github.com/pi-hole/docker-pi-hole/actions?query=workflow%3A%22Test+%26+Build%22) [![Docker Stars](https://img.shields.io/docker/stars/pihole/pihole.svg?maxAge=604800)](https://store.docker.com/community/images/pihole/pihole) [![Docker Pulls](https://img.shields.io/docker/pulls/pihole/pihole.svg?maxAge=604800)](https://store.docker.com/community/images/pihole/pihole)
[![Join the chat at https://gitter.im/diginc/docker-pi-hole](https://badges.gitter.im/diginc/docker-pi-hole.svg)](https://gitter.im/diginc/docker-pi-hole?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Running Pi-hole Docker
## Running Pi-Hole Docker
This container uses 2 popular ports, port 53 and port 80, so **may conflict with existing applications ports**. If you have no other services or docker containers using port 53/80 (if you do, keep reading below for a reverse proxy example), the minimum arguments required to run this container are in the script [docker_run.sh](https://github.com/pi-hole/docker-pi-hole/blob/master/examples/docker_run.sh)
[DockerCloud](https://store.docker.com/community/images/diginc/pi-hole) automatically builds the latest docker-pi-hole changes into images which can easily be pulled and ran with a simple `docker run` command. Changes and updates under development or testing can be found in the [dev tags](#development) section.
One crucial thing to know before starting is this container needs port 53 and port 80, two very popular ports that may conflict with existing applications. If you have no other services or dockers using port 53/80 (if you do, keep reading below for a reverse proxy example), the minimum arguments required to run this container are in the script [docker_run.sh](https://github.com/diginc/docker-pi-hole/blob/master/docker_run.sh) or summarized here:
If you're using a Red Hat based distribution with an SELinux Enforcing policy add `:z` to line with volumes like so:
```
IP_LOOKUP="$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')" # May not work for VPN / tun0
IPv6_LOOKUP="$(ip -6 route get 2001:4860:4860::8888 | awk '{ print $10; exit }')" # May not work for VPN / tun0
IP="${IP:-$IP_LOOKUP}" # use $IP, if set, otherwise IP_LOOKUP
IPv6="${IPv6:-$IPv6_LOOKUP}" # use $IPv6, if set, otherwise IP_LOOKUP
DOCKER_CONFIGS="$(pwd)" # Default of directory you run this from, update to where ever.
docker run -d \
--name pihole \
-p 53:53/tcp -p 53:53/udp -p 80:80 \
-v "${DOCKER_CONFIGS}/pihole/:/etc/pihole/" \
-v "${DOCKER_CONFIGS}/dnsmasq.d/:/etc/dnsmasq.d/" \
-e ServerIP="${IP}" \
-e ServerIPv6="${IPv6}" \
--restart=unless-stopped \
diginc/pi-hole:latest
-v "$(pwd)/etc-pihole:/etc/pihole:z" \
-v "$(pwd)/etc-dnsmasq.d:/etc/dnsmasq.d:z" \
```
**This is just an example and might need changing.** Volumes are stored in the directory `$DOCKER_CONFIGS` and aren't required but are recommended for persisting data across docker re-creations for updating images. As mentioned on line 2, the auto `IP_LOOKUP` variable may not work for VPN tunnel interfaces.
Volumes are recommended for persisting data across container re-creations for updating images. The IP lookup variables may not work for everyone, please review their values and hard code IP and IPv6 if necessary.
You can customize where to store persistent data by setting the `PIHOLE_BASE` environment variable when invoking `docker_run.sh` (e.g. `PIHOLE_BASE=/opt/pihole-storage ./docker_run.sh`). If `PIHOLE_BASE` is not set, files are stored in your current directory when you invoke the script.
**Automatic Ad List Updates** - since the 3.0+ release, `cron` is baked into the container and will grab the newest versions of your lists and flush your logs. **Set your TZ** environment variable to make sure the midnight log rotation syncs up with your timezone's midnight.
## Running DHCP from Docker Pi-Hole
There are multiple different ways to run DHCP from within your Docker Pi-hole container but it is slightly more advanced and one size does not fit all. DHCP and Docker's multiple network modes are covered in detail on our docs site: [Docker DHCP and Network Modes](https://docs.pi-hole.net/docker/DHCP/)
## Environment Variables
There are other environment variables if you want to customize various things inside the docker container:
| Docker Environment Var. | Description |
| ----------------------- | ----------- |
| `-e ServerIP=<Host's IP>`<br/> **Required** | Set to your server's external IP to block ads fully
| `-e ServerIPv6=<Host's IPv6>`<br/> *Required if using IPv6* | **If you have a v6 network** set to your server's external IPv6 to block IPv6 ads fully
| `-e TZ=<Timezone>`<br/> **Recommended** *Default: UTC* | Set your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to make sure logs rotate at local midnight instead of at UTC midnight.
| `-e WEBPASSWORD=<Admin password>`<br/> **Recommended** *Default: random* | http://pi.hole/admin password. Run `docker logs pihole \| grep random` to find your random pass.
| `-e DNS1=<IP>`<br/> *Optional* *Default: 8.8.8.8* | Primary upstream DNS provider, default is google DNS
| `-e DNS2=<IP>`<br/> *Optional* *Default: 8.8.4.4* | Secondary upstream DNS provider, default is google DNS
| `-e VIRTUAL_HOST=<Custom Hostname>`<br/> *Optional* *Default: $ServerIP* | What your web server 'virtual host' is, accessing admin through this Hostname/IP allows you to make changes to the whitelist / blacklists in addition to the default 'http://pi.hole/admin/' address
| `-e IPv6=<True\|False>`<br/> *Optional* *Default: True* | For unraid compatibility, strips out all the IPv6 configuration from DNS/Web services when false.
| `-e INTERFACE=<NIC>`<br/> *Advanced/Optional* | The default works fine with our basic example docker run commands. If you're trying to use DHCP with `--net host` mode then you may have to customize this or DNSMASQ_LISTENING.
| `-e DNSMASQ_LISTENING=<local\|all\|NIC>`<br/> *Advanced/Optional* | `local` listens on all local subnets, `all` permits listening on internet origin subnets in addition to local.
| `-e WEB_PORT=<PORT>`<br/> *Advanced/Optional* | **This will break the 'webpage blocked' functionality of pi-hole** however it may help advanced setups like those running synology or `--net=host` docker argument. This guide explains how to restore webpage blocked functionality using a linux router DNAT rule: [Alternagtive Synology installation method](https://discourse.pi-hole.net/t/alternative-synology-installation-method/5454?u=diginc)
### Recommended Variables
Here is a rundown of the other arguments passed into the example `docker run`:
| Variable | Default | Value | Description |
| -------- | ------- | ----- | ---------- |
| `TZ` | UTC | `<Timezone>` | Set your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to make sure logs rotate at local midnight instead of at UTC midnight.
| `WEBPASSWORD` | random | `<Admin password>` | http://pi.hole/admin password. Run `docker logs pihole \| grep random` to find your random pass.
| `FTLCONF_LOCAL_IPV4` | unset | `<Host's IP>` | Set to your server's LAN IP, used by web block modes and lighttpd bind address.
### Optional Variables
| Variable | Default | Value | Description |
| -------- | ------- | ----- | ---------- |
| `PIHOLE_DNS_` | `8.8.8.8;8.8.4.4` | IPs delimited by `;` | Upstream DNS server(s) for Pi-hole to forward queries to, separated by a semicolon <br/> (supports non-standard ports with `#[port number]`) e.g `127.0.0.1#5053;8.8.8.8;8.8.4.4` <br/> (supports [Docker service names and links](https://docs.docker.com/compose/networking/) instead of IPs) e.g `upstream0;upstream1` where `upstream0` and `upstream1` are the service names of or links to docker services <br/> Note: The existence of this environment variable assumes this as the _sole_ management of upstream DNS. Upstream DNS added via the web interface will be overwritten on container restart/recreation |
| `DNSSEC` | `false` | `<"true"\|"false">` | Enable DNSSEC support |
| `DNS_BOGUS_PRIV` | `true` |`<"true"\|"false">`| Never forward reverse lookups for private ranges |
| `DNS_FQDN_REQUIRED` | `true` | `<"true"\|"false">`| Never forward non-FQDNs |
| `REV_SERVER` | `false` | `<"true"\|"false">` | Enable DNS conditional forwarding for device name resolution |
| `REV_SERVER_DOMAIN` | unset | Network Domain | If conditional forwarding is enabled, set the domain of the local network router |
| `REV_SERVER_TARGET` | unset | Router's IP | If conditional forwarding is enabled, set the IP of the local network router |
| `REV_SERVER_CIDR` | unset | Reverse DNS | If conditional forwarding is enabled, set the reverse DNS zone (e.g. `192.168.0.0/24`) |
| `DHCP_ACTIVE` | `false` | `<"true"\|"false">` | Enable DHCP server. Static DHCP leases can be configured with a custom `/etc/dnsmasq.d/04-pihole-static-dhcp.conf`
| `DHCP_START` | unset | `<Start IP>` | Start of the range of IP addresses to hand out by the DHCP server (mandatory if DHCP server is enabled).
| `DHCP_END` | unset | `<End IP>` | End of the range of IP addresses to hand out by the DHCP server (mandatory if DHCP server is enabled).
| `DHCP_ROUTER` | unset | `<Router's IP>` | Router (gateway) IP address sent by the DHCP server (mandatory if DHCP server is enabled).
| `DHCP_LEASETIME` | 24 | `<hours>` | DHCP lease time in hours.
| `PIHOLE_DOMAIN` | `lan` | `<domain>` | Domain name sent by the DHCP server.
| `DHCP_IPv6` | `false` | `<"true"\|"false">` | Enable DHCP server IPv6 support (SLAAC + RA).
| `DHCP_rapid_commit` | `false` | `<"true"\|"false">` | Enable DHCPv4 rapid commit (fast address assignment).
| `VIRTUAL_HOST` | `$FTLCONF_LOCAL_IPV4` | `<Custom Hostname>` | What your web server 'virtual host' is, accessing admin through this Hostname/IP allows you to make changes to the whitelist / blacklists in addition to the default 'http://pi.hole/admin/' address
| `IPv6` | `true` | `<"true"\|"false">` | For unraid compatibility, strips out all the IPv6 configuration from DNS/Web services when false.
| `TEMPERATUREUNIT` | `c` | `<c\|k\|f>` | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units.
| `WEBUIBOXEDLAYOUT` | `boxed` | `<boxed\|traditional>` | Use boxed layout (helpful when working on large screens)
| `QUERY_LOGGING` | `true` | `<"true"\|"false">` | Enable query logging or not.
| `WEBTHEME` | `default-light` | `<"default-dark"\|"default-darker"\|"default-light"\|"default-auto"\|"lcars">`| User interface theme to use.
| `WEBPASSWORD_FILE`| unset | `<Docker secret path>` |Set an Admin password using [Docker secrets](https://docs.docker.com/engine/swarm/secrets/). If `WEBPASSWORD` is set, `WEBPASSWORD_FILE` is ignored. If `WEBPASSWORD` is empty, and `WEBPASSWORD_FILE` is set to a valid readable file path, then `WEBPASSWORD` will be set to the contents of `WEBPASSWORD_FILE`.
### Advanced Variables
| Variable | Default | Value | Description |
| -------- | ------- | ----- | ---------- |
| `INTERFACE` | unset | `<NIC>` | The default works fine with our basic example docker run commands. If you're trying to use DHCP with `--net host` mode then you may have to customize this or DNSMASQ_LISTENING.
| `DNSMASQ_LISTENING` | unset | `<local\|all\|single>` | `local` listens on all local subnets, `all` permits listening on internet origin subnets in addition to local, `single` listens only on the interface specified.
| `WEB_PORT` | unset | `<PORT>` | **This will break the 'webpage blocked' functionality of Pi-hole** however it may help advanced setups like those running synology or `--net=host` docker argument. This guide explains how to restore webpage blocked functionality using a linux router DNAT rule: [Alternative Synology installation method](https://discourse.pi-hole.net/t/alternative-synology-installation-method/5454?u=diginc)
| `SKIPGRAVITYONBOOT` | unset | `<unset\|1>` | Use this option to skip updating the Gravity Database when booting up the container. By default this environment variable is not set so the Gravity Database will be updated when the container starts up. Setting this environment variable to 1 (or anything) will cause the Gravity Database to not be updated when container starts up.
| `CORS_HOSTS` | unset | `<FQDNs delimited by ,>` | List of domains/subdomains on which CORS is allowed. Wildcards are not supported. Eg: `CORS_HOSTS: domain.com,home.domain.com,www.domain.com`.
| `CUSTOM_CACHE_SIZE` | `10000` | Number | Set the cache size for dnsmasq. Useful for increasing the default cache size or to set it to 0. Note that when `DNSSEC` is "true", then this setting is ignored.
| `FTL_CMD` | `no-daemon` | `no-daemon -- <dnsmasq option>` | Customize the options with which dnsmasq gets started. e.g. `no-daemon -- --dns-forward-max 300` to increase max. number of concurrent dns queries on high load setups. |
| `FTLCONF_[SETTING]` | unset | As per documentation | Customize pihole-FTL.conf with settings described in the [FTLDNS Configuration page](https://docs.pi-hole.net/ftldns/configfile/). For example, to customize LOCAL_IPV4, ensure you have the `FTLCONF_LOCAL_IPV4` environment variable set.
### Experimental Variables
| Variable | Default | Value | Description |
| -------- | ------- | ----- | ---------- |
| `DNSMASQ_USER` | unset | `<pihole\|root>` | Allows changing the user that FTLDNS runs as. Default: `pihole`|
| `PIHOLE_UID` | `999` | 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` | `999` | 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!|
| `WEB_UID` | `33` | Number | Overrides image's default www-data user id to match a host user id<br/>**IMPORTANT**: id must not already be in use inside the container! (Make sure it is different to `PIHOLE_UID` if you are using that, also)|
| `WEB_GID` | `33` | Number | Overrides image's default www-data group id to match a host group id<br/>**IMPORTANT**: id must not already be in use inside the container! (Make sure it is different to `PIHOLE_GID` if you are using that, also)|
| `WEBLOGS_STDOUT` | 0 | 0&vert;1 | 0 logs to defined files, 1 redirect access and error logs to stdout |
## Deprecated environment variables:
While these may still work, they are likely to be removed in a future version. Where applicable, alternative variable names are indicated. Please review the table above for usage of the alternative variables
| Docker Environment Var. | Description | Replaced By |
| ----------------------- | ----------- | ----------- |
| `CONDITIONAL_FORWARDING` | Enable DNS conditional forwarding for device name resolution | `REV_SERVER`|
| `CONDITIONAL_FORWARDING_IP` | If conditional forwarding is enabled, set the IP of the local network router | `REV_SERVER_TARGET` |
| `CONDITIONAL_FORWARDING_DOMAIN` | If conditional forwarding is enabled, set the domain of the local network router | `REV_SERVER_DOMAIN` |
| `CONDITIONAL_FORWARDING_REVERSE` | If conditional forwarding is enabled, set the reverse DNS of the local network router (e.g. `0.168.192.in-addr.arpa`) | `REV_SERVER_CIDR` |
| `DNS1` | Primary upstream DNS provider, default is google DNS | `PIHOLE_DNS_` |
| `DNS2` | Secondary upstream DNS provider, default is google DNS, `no` if only one DNS should used | `PIHOLE_DNS_` |
| `ServerIP` | Set to your server's LAN IP, used by web block modes and lighttpd bind address | `FTLCONF_REPLY_ADDR4` |
| `ServerIPv6` | **If you have a v6 network** set to your server's LAN IPv6 to block IPv6 ads fully | `FTLCONF_REPLY_ADDR6` |
| `FTLCONF_REPLY_ADDR4` | Set to your server's LAN IP, used by web block modes and lighttpd bind address | `FTLCONF_LOCAL_IPV4` |
| `FTLCONF_REPLY_ADDR6` | **If you have a v6 network** set to your server's LAN IPv6 to block IPv6 ads fully | `FTLCONF_LOCAL_IPV6` |
To use these env vars in docker run format style them like: `-e DNS1=1.1.1.1`
Here is a rundown of other arguments for your docker-compose / docker run.
| Docker Arguments | Description |
| ---------------- | ----------- |
| `-p 80:80`<br/>`-p 53:53/tcp -p 53:53/udp`<br/> **Recommended** | Ports to expose, the bare minimum ports required for pi-holes HTTP and DNS services
| `--restart=unless-stopped`<br/> **Recommended** | Automatically (re)start your pihole on boot or in the event of a crash
| `-v /dir/for/pihole:/etc/pihole`<br/> **Recommended** | Volumes for your pihole configs help persist changes across docker image updates
| `-v /dir/for/dnsmasq.d:/etc/dnsmasq.d`<br/> **Recommended** | Volumes for your dnsmasq configs help persist changes across docker image updates
| `--net=host`<br/> *Optional* | Alternative to `-p <port>:<port>` arguments (Cannot be used at same time as -p) if you don't run any other web application
| `--cap-add=NET_ADMIN`<br/> *Optional* | If you want to attempt DHCP (not fully tested or supported) I'd suggest this with --net=host
If you're a fan of [docker-compose](https://docs.docker.com/compose/install/) I have [example docker-compose.yml files](https://github.com/diginc/docker-pi-hole/blob/master/doco-example.yml) in github which I think are a nicer way to represent such long run commands.
| `-p <port>:<port>` **Recommended** | Ports to expose (53, 80, 67), the bare minimum ports required for Pi-holes HTTP and DNS services
| `--restart=unless-stopped`<br/> **Recommended** | Automatically (re)start your Pi-hole on boot or in the event of a crash
| `-v $(pwd)/etc-pihole:/etc/pihole`<br/> **Recommended** | Volumes for your Pi-hole configs help persist changes across docker image updates
| `-v $(pwd)/etc-dnsmasq.d:/etc/dnsmasq.d`<br/> **Recommended** | Volumes for your dnsmasq configs help persist changes across docker image updates
| `--net=host`<br/> *Optional* | Alternative to `-p <port>:<port>` arguments (Cannot be used at same time as -p) if you don't run any other web application. DHCP runs best with --net=host, otherwise your router must support dhcp-relay settings.
| `--cap-add=NET_ADMIN`<br/> *Recommended* | Commonly added capability for DHCP, see [Note on Capabilities](#note-on-capabilities) below for other capabilities.
| `--dns=127.0.0.1`<br/> *Optional* | Sets your container's resolve settings to localhost so it can resolve DHCP hostnames from Pi-hole's DNSMasq, may fix resolution errors on container restart.
| `--dns=1.1.1.1`<br/> *Optional* | Sets a backup server of your choosing in case DNSMasq has problems starting
| `--env-file .env` <br/> *Optional* | File to store environment variables for docker replacing `-e key=value` settings. Here for convenience
## Tips and Tricks
* A good way to test things are working right is by loading this page: [http://pi.hole/admin/](http://pi.hole/admin/)
* [How do I set or reset the Web interface Password?](https://discourse.pi-hole.net/t/how-do-i-set-or-reset-the-web-interface-password/1328)
* `docker exec pihole_container_name pihole -a -p supersecurepassword`
* `docker exec -it pihole_container_name pihole -a -p` - then enter your password into the prompt
* Port conflicts? Stop your server's existing DNS / Web services.
* Ubuntu users especially may need to shut off dns on your docker server so it can run in the container on port 53
* 17.04 and later should disable dnsmasq.
* 17.10 should disable systemd-resolved service. See this page: [How to disable systemd-resolved in Ubuntu](https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu)
* Don't forget to stop your services from auto-starting again after you reboot
* Port 80 is highly recommended because if you have another site/service using port 80 by default then the ads may not transform into blank ads correctly. To make sure docker-pi-hole plays nicely with an existing webserver you run you'll probably need a reverse proxy webserver config if you don't have one already. Pi-Hole must be the default web app on the proxy e.g. if you go to your host by IP instead of domain then pi-hole is served out instead of any other sites hosted by the proxy. This is the '[default_server](http://nginx.org/en/docs/http/ngx_http_core_module.html#listen)' in nginx or ['_default_' virtual host](https://httpd.apache.org/docs/2.4/vhosts/examples.html#default) in Apache and is taken advantage of so any undefined ad domain can be directed to your webserver and get a 'blocked' response instead of ads.
* You can still map other ports to pi-hole port 80 using docker's port forwarding like this `-p 8080:80`, but again the ads won't render properly. Changing the inner port 80 shouldn't be required unless you run docker host networking mode.
* [Here is an example of running with jwilder/proxy](https://github.com/diginc/docker-pi-hole/blob/master/jwilder-proxy-example-doco.yml) (an nginx auto-configuring docker reverse proxy for docker) on my port 80 with pihole on another port. Pi-hole needs to be `DEFAULT_HOST` env in jwilder/proxy and you need to set the matching `VIRTUAL_HOST` for the pihole's container. Please read jwilder/proxy readme for more info if you have trouble. I tested this basic example which is based off what I run.
* Ubuntu users see below for more detailed information
* You can map other ports to Pi-hole port 80 using docker's port forwarding like this `-p 8080:80` if you are using the default blocking mode. If you are using the legacy IP blocking mode, you should not remap this port.
* [Here is an example of running with nginxproxy/nginx-proxy](https://github.com/pi-hole/docker-pi-hole/blob/master/examples/docker-compose-nginx-proxy.yml) (an nginx auto-configuring docker reverse proxy for docker) on my port 80 with Pi-hole on another port. Pi-hole needs to be `DEFAULT_HOST` env in nginxproxy/nginx-proxy and you need to set the matching `VIRTUAL_HOST` for the Pi-hole's container. Please read nginxproxy/nginx-proxy readme for more info if you have trouble.
* Docker's default network mode `bridge` isolates the container from the host's network. This is a more secure setting, but requires setting the Pi-hole DNS option for *Interface listening behavior* to "Listen on all interfaces, permit all origins".
### Installing on Ubuntu or Fedora
Modern releases of Ubuntu (17.10+) and Fedora (33+) include [`systemd-resolved`](http://manpages.ubuntu.com/manpages/bionic/man8/systemd-resolved.service.8.html) which is configured by default to implement a caching DNS stub resolver. This will prevent pi-hole from listening on port 53.
The stub resolver should be disabled with: `sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf`
This will not change the nameserver settings, which point to the stub resolver thus preventing DNS resolution. Change the `/etc/resolv.conf` symlink to point to `/run/systemd/resolve/resolv.conf`, which is automatically updated to follow the system's [`netplan`](https://netplan.io/):
`sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf'`
After making these changes, you should restart systemd-resolved using `systemctl restart systemd-resolved`
Once pi-hole is installed, you'll want to configure your clients to use it ([see here](https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi-hole-as-their-dns-server/245)). If you used the symlink above, your docker host will either use whatever is served by DHCP, or whatever static setting you've configured. If you want to explicitly set your docker host's nameservers you can edit the netplan(s) found at `/etc/netplan`, then run `sudo netplan apply`.
Example netplan:
```yaml
network:
ethernets:
ens160:
dhcp4: true
dhcp4-overrides:
use-dns: false
nameservers:
addresses: [127.0.0.1]
version: 2
```
Note that it is also possible to disable `systemd-resolved` entirely. However, this can cause problems with name resolution in vpns ([see bug report](https://bugs.launchpad.net/network-manager/+bug/1624317)). It also disables the functionality of netplan since systemd-resolved is used as the default renderer ([see `man netplan`](http://manpages.ubuntu.com/manpages/bionic/man5/netplan.5.html#description)). If you choose to disable the service, you will need to manually set the nameservers, for example by creating a new `/etc/resolv.conf`.
Users of older Ubuntu releases (circa 17.04) will need to disable dnsmasq.
## Installing on Dokku
@Rikj000 has produced a guide to assist users [installing Pi-hole on Dokku](https://github.com/Rikj000/Pihole-Dokku-Installation)
## Docker tags and versioning
The primary docker tags / versions are explained in the following table. [Click here to see the full list of tags](https://store.docker.com/community/images/diginc/pi-hole/tags), I also try to tag with the specific version of Pi-Hole Core for version pinning purposes, the web version that comes with the core releases should be in the [GitHub Release notes](https://github.com/diginc/docker-pi-hole/releases).
The primary docker tags are explained in the following table. [Click here to see the full list of tags](https://store.docker.com/community/images/pihole/pihole/tags). See [GitHub Release notes](https://github.com/pi-hole/docker-pi-hole/releases) to see the specific version of Pi-hole Core, Web, and FTL included in the release.
| tag | architecture | description | Dockerfile |
| --- | ------------ | ----------- | ---------- |
| `debian` / `latest` | x86 | Debian x86 image, container running lighttpd and dnsmasq | [Dockerfile](https://github.com/diginc/docker-pi-hole/blob/master/debian.docker) |
### `diginc/pi-hole:debian` [![](https://images.microbadger.com/badges/image/diginc/pi-hole:debian.svg)](https://microbadger.com/images/diginc/pi-hole "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/version/diginc/pi-hole:debian.svg)](https://microbadger.com/images/diginc/pi-hole "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/version/diginc/pi-hole:latest.svg)](https://microbadger.com/images/diginc/pi-hole "Get your own version badge on microbadger.com")
This version of the docker aims to be as close to a standard pi-hole installation by using the recommended base OS and the exact configs and scripts (minimally modified to get them working). This enables fast updating when an update comes from pi-hole.
### `diginc/pi-hole-multiarch:debian_armhf` [![](https://images.microbadger.com/badges/image/diginc/pi-hole-multiarch:debian_armhf.svg)](https://microbadger.com/images/diginc/pi-hole-multiarch "Get your own image badge on microbadger.com")
Latest version of ARM-compatible pihole image
https://hub.docker.com/r/diginc/pi-hole-multiarch/tags/
### `diginc/pi-hole-multiarch:debian_aarch64` [![](https://images.microbadger.com/badges/image/diginc/pi-hole-multiarch:debian_aarch64.svg)](https://microbadger.com/images/diginc/pi-hole-multiarch "Get your own image badge on microbadger.com")
Latest version of ARM64-compatible pihole image
https://hub.docker.com/r/diginc/pi-hole-multiarch/tags/
| tag | description
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `latest` | Always latest release |
| `2022.04` | Date-based release that can receive bugfix updates |
| `2022.04.1` | A specific image that will not receive updates |
| `dev` | Similar to `latest`, but for the development branch (pushed occasionally) |
| `*beta` | Early beta releases of upcoming versions - here be dragons |
| `nightly` | Like `dev` but pushed every night and pulls from the latest `development` branches of the core Pi-hole components (Pi-hole, AdminLTE, FTL) |
## Upgrading, Persistence, and Customizations
The standard pi-hole customization abilities apply to this docker, but with docker twists such as using docker volume mounts to map host stored file configurations over the container defaults. Volumes are also important to persist the configuration in case you have removed the pi-hole container which is a typical docker upgrade pattern.
The standard Pi-hole customization abilities apply to this docker, but with docker twists such as using docker volume mounts to map host stored file configurations over the container defaults. However, mounting these configuration files as read-only should be avoided. Volumes are also important to persist the configuration in case you have removed the Pi-hole container which is a typical docker upgrade pattern.
### Upgrading
### Upgrading / Reconfiguring
`pihole -up` is disabled. Upgrade the docker way instead, please. Long-living docker containers are not the docker way.
Do not attempt to upgrade (`pihole -up`) or reconfigure (`pihole -r`). New images will be released for upgrades, upgrading by replacing your old container with a fresh upgraded image is the 'docker way'. Long-living docker containers are not the docker way since they aim to be portable and reproducible, why not re-create them often! Just to prove you can.
1. Download the latest version of the image: `docker pull diginc/pi-hole`
0. Read the release notes for both this Docker release and the Pi-hole release
* This will help you avoid common problems due to any known issues with upgrading or newly required arguments or variables
* We will try to put common break/fixes at the top of this readme too
1. Download the latest version of the image: `docker pull pihole/pihole`
2. Throw away your container: `docker rm -f pihole`
* **Warning** When removing your pihole container you may be stuck without DNS until step 3; **docker pull** before **docker rm -f** to avoid DNS inturruption **OR** always have a fallback DNS server configured in DHCP to avoid this problem altogether.
* If you care about your data (logs/customizations), make sure you have it volume-mapped or it will be deleted in this step.
3. Start your container with the newer base image: `docker run <args> diginc/pi-hole` (`<args>` being your preferred run volumes and env vars)
* **Warning** When removing your pihole container you may be stuck without DNS until step 3; **docker pull** before **docker rm -f** to avoid DNS interruption **OR** always have a fallback DNS server configured in DHCP to avoid this problem altogether.
* If you care about your data (logs/customizations), make sure you have it volume-mapped or it will be deleted in this step.
3. Start your container with the newer base image: `docker run <args> pihole/pihole` (`<args>` being your preferred run volumes and env vars)
Why is this style of upgrading good? A couple reasons: Everyone is starting from the same base image which has been tested to know it works. No worrying about upgrading from A to B, B to C, or A to C is required when rolling out updates, it reducing complexity, and simply allows a 'fresh start' every time while preserving customizations with volumes. Basically I'm encouraging [phoenix servers](https://www.google.com/?q=phoenix+servers) principles for your containers.
Why is this style of upgrading good? A couple reasons: Everyone is starting from the same base image which has been tested to known it works. No worrying about upgrading from A to B, B to C, or A to C is required when rolling out updates, it reduces complexity, and simply allows a 'fresh start' every time while preserving customizations with volumes. Basically I'm encouraging [phoenix server](https://www.google.com/?q=phoenix+servers) principles for your containers.
To reconfigure Pi-hole you'll either need to use an existing container environment variables or if there is no a variable for what you need, use the web UI or CLI commands.
### Pihole features
### Pi-hole features
Here are some relevant wiki pages from [pi-hole's documentation](https://github.com/pi-hole/pi-hole/blob/master/README.md#get-help-or-connect-with-us-on-the-web). The web interface or command line tools can be used to implement changes to pihole.
Here are some relevant wiki pages from [Pi-hole's documentation](https://github.com/pi-hole/pi-hole/blob/master/README.md#get-help-or-connect-with-us-on-the-web). The web interface or command line tools can be used to implement changes to pihole.
We install all pihole utilities so the the built in [pihole commands](https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738) will work via `docker exec <container> <command>` like so:
@@ -138,24 +270,41 @@ We install all pihole utilities so the the built in [pihole commands](https://di
### Customizations
The webserver and DNS service inside the container can be customized if necessary. Any configuration files you volume mount into `/etc/dnsmasq.d/` will be loaded by dnsmasq when the container starts or restarts or if you need to modify the pi-hole config it is located at `/etc/dnsmasq.d/01-pihole.conf`. The docker start scripts runs a config test prior to starting so it will tell you about any errors in the docker log.
The webserver and DNS service inside the container can be customized if necessary. Any configuration files you volume mount into `/etc/dnsmasq.d/` will be loaded by dnsmasq when the container starts or restarts or if you need to modify the Pi-hole config it is located at `/etc/dnsmasq.d/01-pihole.conf`. The docker start scripts runs a config test prior to starting so it will tell you about any errors in the docker log.
Similarly for the webserver you can customize configs in /etc/lighttpd (*:debian* tag).
Similarly for the webserver you can customize configs in /etc/lighttpd
### Systemd init script
As long as your docker system service auto starts on boot and you run your container with `--restart=unless-stopped` your container should always start on boot and restart on crashes. If you prefer to have your docker container run as a systemd service instead, add the file [pihole.service](https://raw.githubusercontent.com/diginc/docker-pi-hole/master/pihole.service) to "/etc/systemd/system"; customize whatever your container name is and remove `--restart=unless-stopped` from your docker run. Then after you have initially created the docker container using the docker run command above, you can control it with "systemctl start pihole" or "systemctl stop pihole" (instead of `docker start`/`docker stop`). You can also enable it to auto-start on boot with "systemctl enable pihole" (as opposed to `--restart=unless-stopped` and making sure docker service auto-starts on boot).
As long as your docker system service auto starts on boot and you run your container with `--restart=unless-stopped` your container should always start on boot and restart on crashes. If you prefer to have your docker container run as a systemd service instead, add the file [pihole.service](https://raw.githubusercontent.com/pi-hole/docker-pi-hole/master/examples/pihole.service) to "/etc/systemd/system"; customize whatever your container name is and remove `--restart=unless-stopped` from your docker run. Then after you have initially created the docker container using the docker run command above, you can control it with "systemctl start pihole" or "systemctl stop pihole" (instead of `docker start`/`docker stop`). You can also enable it to auto-start on boot with "systemctl enable pihole" (as opposed to `--restart=unless-stopped` and making sure docker service auto-starts on boot).
NOTE: After initial run you may need to manually stop the docker container with "docker stop pihole" before the systemctl can start controlling the container.
## Development
## Note on Capabilities
[![Build Status](https://api.travis-ci.org/diginc/docker-pi-hole.svg?branch=dev)](https://travis-ci.org/diginc/docker-pi-hole) If you plan on making a contribution please pull request to the dev branch. I also build tags of the dev branch for bug fix testing after merges have been made:
DNSMasq / [FTLDNS](https://docs.pi-hole.net/ftldns/in-depth/#linux-capabilities) expects to have the following capabilities available:
- `CAP_NET_BIND_SERVICE`: Allows FTLDNS binding to TCP/UDP sockets below 1024 (specifically DNS service on port 53)
- `CAP_NET_RAW`: use raw and packet sockets (needed for handling DHCPv6 requests, and verifying that an IP is not in use before leasing it)
- `CAP_NET_ADMIN`: modify routing tables and other network-related operations (in particular inserting an entry in the neighbor table to answer DHCP requests using unicast packets)
- `CAP_SYS_NICE`: FTL sets itself as an important process to get some more processing time if the latter is running low
- `CAP_CHOWN`: we need to be able to change ownership of log files and databases in case FTL is started as a different user than `pihole`
| tag | architecture | description | Dockerfile |
| --- | ------------ | ----------- | ---------- |
| `debian_dev` | x86 | Debian x86 image, container running lighttpd and dnsmasq | [Dockerfile](https://github.com/diginc/docker-pi-hole/blob/dev/debian.docker) |
This image automatically grants those capabilities, if available, to the FTLDNS process, even when run as non-root.\
By default, docker does not include the `NET_ADMIN` capability for non-privileged containers, and it is recommended to explicitly add it to the container using `--cap-add=NET_ADMIN`.\
However, if DHCP and IPv6 Router Advertisements are not in use, it should be safe to skip it. For the most paranoid, it should even be possible to explicitly drop the `NET_RAW` capability to prevent FTLDNS from automatically gaining it.
## Note on Watchtower
We have noticed that a lot of people use Watchtower to keep their Pi-hole containers up to date. For the same reason we don't provide an auto-update feature on a bare metal install, you _should not_ have a system automatically update your Pi-hole container. Especially unattended. As much as we try to ensure nothing will go wrong, sometimes things do go wrong - and you need to set aside time to _manually_ pull and update to the version of the container you wish to run. The upgrade process should be along the lines of:
- **Important**: Read the release notes. Sometimes you will need to make changes other than just updating the image
- Pull the new image
- Stop and _remove_ the running Pi-hole container
- 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
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
Please report issues on the [GitHub project](https://github.com/diginc/docker-pi-hole) when you suspect something docker related. Pi-Hole questions are best answered on their [user forums](https://github.com/pi-hole/pi-hole/blob/master/README.md#get-help-or-connect-with-us-on-the-web). Ping me (@diginc) on there if it's a docker and you're not sure if it's docker related.
Please report issues on the [GitHub project](https://github.com/pi-hole/docker-pi-hole) when you suspect something docker related. Pi-hole or general docker questions are best answered on our [user forums](https://discourse.pi-hole.net/c/bugs-problems-issues/docker/30).

View File

@@ -1,21 +0,0 @@
# Prerequisites
Make sure you have docker, python, and pip. I won't cover how to install those here, please search the internet for that info if you need it.
# Running tests locally
Travis-ci auto runs tests during pull requests (PR) but it only has 2 cores and if you have more/faster cpus your PC's local tests will be faster and you'll have quicker feedback loops than continually pushing to have your PR run travis-ci
After you have the prereqs, to get the required pip packages run: `pip install -r requirements.txt`
To run the Dockerfile templating, image build, and tests all in one command just run: `tox`
# Local image names
Docker images built by `tox` or `python Dockerfile.py` are named the same but stripped of the `diginc/` docker repository namespace.
e.g. `pi-hole:debian_amd64` or `pi-hole-multiarch:debian_aarch64`
You can run the multiarch images on an amd64 development system if you [enable binfmt-support as described in the multiarch image docs](https://hub.docker.com/r/multiarch/multiarch/debian-debootstrap/)
`docker run --rm --privileged multiarch/qemu-user-static:register --reset`

View File

@@ -1 +0,0 @@
py.test -f ./test -v $@

View File

@@ -1,246 +0,0 @@
#!/bin/bash
. /opt/pihole/webpage.sh
setupVars="$setupVars"
ServerIP="$ServerIP"
ServerIPv6="$ServerIPv6"
IPv6="$IPv6"
prepare_setup_vars() {
touch "$setupVars"
}
validate_env() {
if [ -z "$ServerIP" ] ; then
echo "ERROR: To function correctly you must pass an environment variables of 'ServerIP' into the docker container with the IP of your docker host from which you are passing web (80) and dns (53) ports from"
exit 1
fi;
# Required ServerIP is a valid IP
# nc won't throw any text based errors when it times out connecting to a valid IP, otherwise it complains about the DNS name being garbage
# if nc doesn't behave as we expect on a valid IP the routing table should be able to look it up and return a 0 retcode
if [[ "$(nc -4 -w1 -z "$ServerIP" 53 2>&1)" != "" ]] || ! ip route get "$ServerIP" > /dev/null ; then
echo "ERROR: ServerIP Environment variable ($ServerIP) doesn't appear to be a valid IPv4 address"
exit 1
fi
# Optional IPv6 is a valid address
if [[ -n "$ServerIPv6" ]] ; then
if [[ "$ServerIPv6" == 'kernel' ]] ; then
echo "ERROR: You passed in IPv6 with a value of 'kernel', this maybe beacuse you do not have IPv6 enabled on your network"
unset ServerIPv6
exit 1
fi
if [[ "$(nc -6 -w1 -z "$ServerIPv6" 53 2>&1)" != "" ]] || ! ip route get "$ServerIPv6" > /dev/null ; then
echo "ERROR: ServerIPv6 Environment variable ($ServerIPv6) doesn't appear to be a valid IPv6 address"
echo " TIP: If your server is not IPv6 enabled just remove '-e ServerIPv6' from your docker container"
exit 1
fi
fi;
}
setup_dnsmasq_dns() {
. /opt/pihole/webpage.sh
local DNS1="${1:-8.8.8.8}"
local DNS2="${2:-8.8.4.4}"
local dnsType='default'
if [ "$DNS1" != '8.8.8.8' ] || [ "$DNS2" != '8.8.4.4' ] ; then
dnsType='custom'
fi;
if [ ! -f /.piholeFirstBoot ] ; then
local setupDNS1="$(grep 'PIHOLE_DNS_1' ${setupVars})"
local setupDNS2="$(grep 'PIHOLE_DNS_2' ${setupVars})"
if [[ -n "$DNS1" && -n "$setupDNS1" ]] || \
[[ -n "$DNS2" && -n "$setupDNS2" ]] ; then
echo "Docker DNS variables not used"
fi
echo "Existing DNS servers used"
return
fi
echo "Using $dnsType DNS servers: $DNS1 & $DNS2"
if [[ -n "$DNS1" && -z "$setupDNS1" ]] ; then
change_setting "PIHOLE_DNS_1" "${DNS1}"
fi
if [[ -n "$DNS2" && -z "$setupDNS2" ]] ; then
change_setting "PIHOLE_DNS_2" "${DNS2}"
fi
}
setup_dnsmasq_interface() {
local INTERFACE="${1:-eth0}"
local interfaceType='default'
if [ "$INTERFACE" != 'eth0' ] ; then
interfaceType='custom'
fi;
echo "DNSMasq binding to $interfaceType interface: $INTERFACE"
[ -n "$INTERFACE" ] && change_setting "PIHOLE_INTERFACE" "${INTERFACE}"
}
setup_dnsmasq_config_if_missing() {
# When fresh empty directory volumes are used we miss this file
if [ ! -f /etc/dnsmasq.d/01-pihole.conf ] ; then
cp /etc/.pihole/advanced/01-pihole.conf /etc/dnsmasq.d/
fi;
}
setup_dnsmasq() {
# Coordinates
setup_dnsmasq_config_if_missing
setup_dnsmasq_dns "$DNS1" "$DNS2"
setup_dnsmasq_interface "$INTERFACE"
ProcessDNSSettings
# dnsmasq -7 /etc/dnsmasq.d --interface="${INTERFACE:-eth0}"
}
setup_dnsmasq_hostnames() {
# largely borrowed from automated install/basic-install.sh
local IPV4_ADDRESS="${1}"
local IPV6_ADDRESS="${2}"
local hostname="${3}"
local dnsmasq_pihole_01_location="/etc/dnsmasq.d/01-pihole.conf"
if [ -z "$hostname" ]; then
if [[ -f /etc/hostname ]]; then
hostname=$(</etc/hostname)
elif [ -x "$(command -v hostname)" ]; then
hostname=$(hostname -f)
fi
fi;
if [[ "${IPV4_ADDRESS}" != "" ]]; then
tmp=${IPV4_ADDRESS%/*}
sed -i "s/@IPV4@/$tmp/" ${dnsmasq_pihole_01_location}
else
sed -i '/^address=\/pi.hole\/@IPV4@/d' ${dnsmasq_pihole_01_location}
sed -i '/^address=\/@HOSTNAME@\/@IPV4@/d' ${dnsmasq_pihole_01_location}
fi
if [[ "${IPV6_ADDRESS}" != "" ]]; then
sed -i "s/@IPv6@/$IPV6_ADDRESS/" ${dnsmasq_pihole_01_location}
else
sed -i '/^address=\/pi.hole\/@IPv6@/d' ${dnsmasq_pihole_01_location}
sed -i '/^address=\/@HOSTNAME@\/@IPv6@/d' ${dnsmasq_pihole_01_location}
fi
if [[ "${hostname}" != "" ]]; then
sed -i "s/@HOSTNAME@/$hostname/" ${dnsmasq_pihole_01_location}
else
sed -i '/^address=\/@HOSTNAME@*/d' ${dnsmasq_pihole_01_location}
fi
}
setup_lighttpd_bind() {
if [[ "$TAG" == 'debian' ]] ; then
# if using '--net=host' only bind lighttpd on $ServerIP and localhost
if grep -q "docker" /proc/net/dev ; then #docker (docker0 by default) should only be present on the host system
if ! grep -q "server.bind" /etc/lighttpd/lighttpd.conf ; then # if the declaration is already there, don't add it again
sed -i -E "s/server\.port\s+\=\s+80/server.bind\t\t = \"${ServerIP}\"\nserver.port\t\t = 80\n"\$SERVER"\[\"socket\"\] == \"127\.0\.0\.1:80\" \{\}/" /etc/lighttpd/lighttpd.conf
fi
fi
fi
}
setup_php_env() {
case $TAG in
"debian") setup_php_env_debian ;;
esac
}
setup_php_env_debian() {
if [ -z "$VIRTUAL_HOST" ] ; then
VIRTUAL_HOST="$ServerIP"
fi;
local vhost_line="\t\t\t\"VIRTUAL_HOST\" => \"${VIRTUAL_HOST}\","
local serverip_line="\t\t\t\"ServerIP\" => \"${ServerIP}\","
local php_error_line="\t\t\t\"PHP_ERROR_LOG\" => \"${PHP_ERROR_LOG}\","
# idempotent line additions
grep -qP "$vhost_line" "$PHP_ENV_CONFIG" || \
sed -i "/bin-environment/ a\\${vhost_line}" "$PHP_ENV_CONFIG"
grep -qP "$serverip_line" "$PHP_ENV_CONFIG" || \
sed -i "/bin-environment/ a\\${serverip_line}" "$PHP_ENV_CONFIG"
grep -qP "$php_error_line" "$PHP_ENV_CONFIG" || \
sed -i "/bin-environment/ a\\${php_error_line}" "$PHP_ENV_CONFIG"
echo "Added ENV to php:"
grep -E '(VIRTUAL_HOST|ServerIP|PHP_ERROR_LOG)' "$PHP_ENV_CONFIG"
}
setup_web_port() {
local warning="WARNING: Custom WEB_PORT not used"
# Quietly exit early for empty or default
if [[ -z "${1}" || "${1}" == '80' ]] ; then return ; fi
if ! echo $1 | grep -q '^[0-9][0-9]*$' ; then
echo "$warning - $1 is not an integer"
return
fi
local -i web_port="$1"
if (( $web_port < 1 || $web_port > 65535 )); then
echo "$warning - $web_port is not within valid port range of 1-65535"
return
fi
echo "Custom WEB_PORT set to $web_port"
echo "INFO: Without proper router DNAT forwarding to $ServerIP:$web_port, you may not get any blocked websites on ads"
# Update lighttpd's port
sed -i '/server.port\s*=\s*80\s*$/ s/80/'$WEB_PORT'/g' /etc/lighttpd/lighttpd.conf
# Update any default port 80 references in the HTML
grep -Prl '://127\.0\.0\.1/' /var/www/html/ | xargs -r sed -i "s|/127\.0\.0\.1/|/127.0.0.1:${WEB_PORT}/|g"
grep -Prl '://pi\.hole/' /var/www/html/ | xargs -r sed -i "s|/pi\.hole/|/pi\.hole:${WEB_PORT}/|g"
}
setup_web_password() {
if [ -z "${WEBPASSWORD+x}" ] ; then
# Not set at all, give the user a random pass
WEBPASSWORD=$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 8)
echo "Assigning random password: $WEBPASSWORD"
fi;
set -x
if [[ "$WEBPASSWORD" == "" ]] ; then
echo "" | pihole -a -p
else
pihole -a -p "$WEBPASSWORD" "$WEBPASSWORD"
fi
{ set +x; } 2>/dev/null
}
setup_ipv4_ipv6() {
local ip_versions="IPv4 and IPv6"
if [ "$IPv6" != "True" ] ; then
ip_versions="IPv4"
case $TAG in
"debian") sed -i '/use-ipv6.pl/ d' /etc/lighttpd/lighttpd.conf ;;
esac
fi;
echo "Using $ip_versions"
}
test_configs() {
case $TAG in
"debian") test_configs_debian ;;
esac
}
test_configs_debian() {
set -e
echo -n '::: Testing DNSmasq config: '
dnsmasq --test -7 /etc/dnsmasq.d || exit 1
echo -n '::: Testing lighttpd config: '
lighttpd -t -f /etc/lighttpd/lighttpd.conf || exit 1
set +e
echo "::: All config checks passed, starting ..."
}
test_framework_stubbing() {
if [ -n "$PYTEST" ] ; then
echo ":::::: Tests are being ran - stub out ad list fetching and add a fake ad block"
sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)"
echo '123.123.123.123 testblock.pi-hole.local' > /var/www/html/fake.list
echo 'file:///var/www/html/fake.list' > /etc/pihole/adlists.list
echo 'http://localhost/fake.list' >> /etc/pihole/adlists.list
fi
}

20
build-and-test.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -ex
if [[ "$1" == "enter" ]]; then
enter="-it --entrypoint=bash"
fi
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD | sed "s/\//-/g")
GIT_TAG=$(git describe --tags --exact-match 2> /dev/null || true)
GIT_TAG="${GIT_TAG:-$GIT_BRANCH}"
# generate and build dockerfile
docker build --tag image_pipenv --file test/Dockerfile test/
docker run --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd):/$(pwd)" \
--workdir "$(pwd)" \
--env PIPENV_CACHE_DIR="$(pwd)/.pipenv" \
--env GIT_TAG="${GIT_TAG}" \
${enter} image_pipenv

View File

@@ -1,25 +0,0 @@
#!/bin/bash
# Script for manually pushing the docker arm images for diginc only
# (no one else has docker repo permissions)
if [ ! -f ~/.docker/config.json ] ; then
echo "Error: You should setup your docker push authorization first"
exit 1
fi
if [[ "$1" == 'prod' ]] ; then
export version='3.3'
for tag in debian_armhf debian_aarch64; do
# Verison specific tags for ongoing history
docker tag pi-hole-multiarch:$tag diginc/pi-hole-multiarch:v${version}_${tag}
docker push diginc/pi-hole-multiarch:v${version}_${tag}
# Floating latest tags
docker tag pi-hole-multiarch:$tag diginc/pi-hole-multiarch:${tag}
docker push diginc/pi-hole-multiarch:${tag}
done
elif [[ "$1" == 'dev' ]] ; then
for tag in debian_armhf debian_aarch64; do
# Floating dev tag
docker tag pi-hole-multiarch:$tag diginc/pi-hole-multiarch:${tag}_dev
docker push diginc/pi-hole-multiarch:${tag}_dev
done
fi

View File

@@ -1 +0,0 @@
doco-alpine.yml

View File

@@ -1,21 +0,0 @@
#!/bin/bash
IP_LOOKUP="$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')" # May not work for VPN / tun0
IPv6_LOOKUP="$(ip -6 route get 2001:4860:4860::8888 | awk '{ print $10; exit }')" # May not work for VPN / tun0
IP="${IP:-$IP_LOOKUP}" # use $IP, if set, otherwise IP_LOOKUP
IPv6="${IPv6:-$IPv6_LOOKUP}" # use $IPv6, if set, otherwise IP_LOOKUP
DOCKER_CONFIGS="$(pwd)" # Default of directory you run this from, update to where ever.
echo "IP: ${IP} - IPv6: ${IPv6}"
# Default ports + daemonized docker container
docker run -d \
--name pihole \
-p 53:53/tcp -p 53:53/udp -p 80:80 \
-v "${DOCKER_CONFIGS}/pihole/:/etc/pihole/" \
-v "${DOCKER_CONFIGS}/dnsmasq.d/:/etc/dnsmasq.d/" \
-e ServerIP="${IP:-$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')}" \
-e ServerIPv6="${IPv6:-$(ip -6 route get 2001:4860:4860::8888 | awk '{ print $10; exit }')}" \
--restart=always \
diginc/pi-hole:latest
docker logs pihole 2> /dev/null | grep 'password:'

View File

@@ -1,28 +0,0 @@
version: "3"
services:
pihole:
image: diginc/pi-hole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
environment:
# enter your docker host IP here
ServerIP:
# IPv6 Address if your network supports it
#ServerIPv6: 192.168.1.55
# jwilder/proxy envs, see readme for more info
PROXY_LOCATION: pihole
VIRTUAL_HOST: pihole.yourdomain.local
VIRTUAL_PORT: 80
# Add your own custom hostnames you need for your domain
extra_hosts:
# Point any of the jwilder virtual_host addresses
# to your docker host ip address
- 'pihole.yourdomain.local:192.168.1.55'
volumes:
# - '/etc/pihole/:/etc/pihole/'
# WARNING: if this log don't exist as a file on the host already
# docker will try to create a directory in it's place making for lots of errors
# - '/var/log/pihole.log:/var/log/pihole.log'
restart: always

5
examples/Caddyfile Normal file
View File

@@ -0,0 +1,5 @@
pihole-dev.lab {
tls internal
redir / /admin
reverse_proxy pihole:8081
}

View File

@@ -0,0 +1,66 @@
version: "3"
services:
# Caddy example derived from Caddy's own example at https://hub.docker.com/_/caddy
caddy:
container_name: caddy
image: caddy:latest
networks:
- caddy-net # Network exclusively for Caddy-proxied containers
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp" # QUIC protocol support: https://www.chromium.org/quic/
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile # config file on host in same directory as docker-compose.yml for easy editing.
#- $PWD/site:/srv # Only use if you are serving a website behind caddy
- caddy_data:/data # Use docker volumes here bc no need to access these files from host
- caddy_config:/config # Use docker volumes here bc no need to access these files from host
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
pihole:
depends_on:
- caddy
container_name: pihole
#dns: # Optional. Specify desired upstream DNS servers here.
# - 127.0.0.1
# - 9.9.9.9
# - 149.112.112.112
image: pihole/pihole:latest
networks:
- caddy-net # Need to plug into caddy net to access proxy
ports:
- "8081:80/tcp" # Pi-hole web admin interface, proxied through Caddy (configure port in Caddyfile)
# Following are NOT proxied through Caddy, bound to host net instead:
- "53:53/udp"
- "53:53/tcp"
- "853:853/tcp" # DNS-over-TLS
#- "67:67/udp" # DHCP, if desired. If not bound to host net you need an mDNS proxy service configured somewhere on host net.
# ref: https://docs.pi-hole.net/docker/DHCP/
environment:
TZ: 'America/New_York' # Supported TZ database names: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations
WEBPASSWORD: 'password' # Only used on first boot, change with pihole cli then comment out here.
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
- './etc-lighttpd/external.conf:/etc/lighttpd/external.conf' # Recommend leave as bind mount for easier editing.
# ref for why you may need to change this file: https://docs.pi-hole.net/guides/webserver/caddy/#modifying-lighttpd-configuration
#cap_add: # Uncomment if using Pi-hole as DHCP server
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
#- NET_ADMIN # ONLY required if you are using Pi-hole as your DHCP server, else remove for better security
restart: unless-stopped
# ref: https://hub.docker.com/_/caddy
networks:
caddy-net:
driver: bridge
name: caddy-net
# ref: https://hub.docker.com/_/caddy
volumes:
caddy_data:
external: true # May need to create volume with 'docker volume create caddy_data'
caddy_config:

View File

@@ -0,0 +1,59 @@
version: "3"
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md
services:
nginx-proxy:
image: nginxproxy/nginx-proxy
ports:
- '80:80'
environment:
DEFAULT_HOST: pihole.yourDomain.lan
volumes:
- '/var/run/docker.sock:/tmp/docker.sock'
restart: always
pihole:
image: pihole/pihole:latest
ports:
- '53:53/tcp'
- '53:53/udp'
- "67:67/udp"
- '8053:80/tcp'
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# run `touch ./var-log/pihole.log` first unless you like errors
# - './var-log/pihole.log:/var/log/pihole/pihole.log'
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
environment:
ServerIP: 192.168.41.55
PROXY_LOCATION: pihole
VIRTUAL_HOST: pihole.yourDomain.lan
VIRTUAL_PORT: 80
extra_hosts:
# Resolve to nothing domains (terminate connection)
- 'nw2master.bioware.com nwn2.master.gamespy.com:0.0.0.0'
# LAN hostnames for other docker containers using nginx-proxy
- 'yourDomain.lan:192.168.41.55'
- 'pihole pihole.yourDomain.lan:192.168.41.55'
- 'ghost ghost.yourDomain.lan:192.168.41.55'
- 'wordpress wordpress.yourDomain.lan:192.168.41.55'
restart: always
# Another container you might want to have running through the proxy
# Note it also have ENV Vars like pihole and a host under pihole's extra_hosts
# ghost:
# image: fractalf/ghost
# ports:
# - '2368:2368/tcp'
# volumes:
# - '/etc/ghost:/ghost-override'
# environment:
# PROXY_LOCATION: ghost
# VIRTUAL_HOST: ghost.yourDomain.lan
# VIRTUAL_PORT: 2368
# restart: always

View File

@@ -0,0 +1,25 @@
version: "3"
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "80:80/tcp"
environment:
TZ: 'America/Chicago'
# WEBPASSWORD: 'set a secure password here or it will be random'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
restart: unless-stopped # Recommended but not required (DHCP needs NET_ADMIN)

View File

@@ -22,7 +22,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Download any updates from the adlists
59 1 * * 7 root PATH="$PATH:/usr/local/bin/" docker exec $DOCKER_NAME pihole updateGravity > /dev/null
# Update docker-pi-hole by pulling the latest docker image ane re-creating your container.
# Update docker-pi-hole by pulling the latest docker image and re-creating your container.
# pihole software update commands are unsupported in docker!
#30 2 * * 7 root PATH="$PATH:/usr/local/bin/" docker exec $DOCKER_NAME pihole updatePihole > /dev/null

39
examples/docker_run.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md
PIHOLE_BASE="${PIHOLE_BASE:-$(pwd)}"
[[ -d "$PIHOLE_BASE" ]] || mkdir -p "$PIHOLE_BASE" || { echo "Couldn't create storage directory: $PIHOLE_BASE"; exit 1; }
# Note: FTLCONF_LOCAL_IPV4 should be replaced with your external ip.
docker run -d \
--name pihole \
-p 53:53/tcp -p 53:53/udp \
-p 80:80 \
-e TZ="America/Chicago" \
-v "${PIHOLE_BASE}/etc-pihole:/etc/pihole" \
-v "${PIHOLE_BASE}/etc-dnsmasq.d:/etc/dnsmasq.d" \
--dns=127.0.0.1 --dns=1.1.1.1 \
--restart=unless-stopped \
--hostname pi.hole \
-e VIRTUAL_HOST="pi.hole" \
-e PROXY_LOCATION="pi.hole" \
-e FTLCONF_LOCAL_IPV4="127.0.0.1" \
pihole/pihole:latest
printf 'Starting up pihole container '
for i in $(seq 1 20); do
if [ "$(docker inspect -f "{{.State.Health.Status}}" pihole)" == "healthy" ] ; then
printf ' OK'
echo -e "\n$(docker logs pihole 2> /dev/null | grep 'password:') for your pi-hole: http://${IP}/admin/"
exit 0
else
sleep 3
printf '.'
fi
if [ $i -eq 20 ] ; then
echo -e "\nTimed out waiting for Pi-hole start, consult your container logs for more info (\`docker logs pihole\`)"
exit 1
fi
done;

View File

@@ -1,77 +0,0 @@
#!/bin/bash -ex
mkdir -p /etc/pihole/
mkdir -p /var/run/pihole
export CORE_TAG='v3.3.1'
export WEB_TAG='v3.3'
export FTL_TAG='v3.0'
export USE_DEVELOPMENT_BRANCHES=false
if [[ $USE_DEVELOPMENT_BRANCHES == true ]] ; then
# install from custom hash or branch
CORE_TAG='development'
fi
# Make pihole scripts fail searching for `systemctl`,
# which fails pretty miserably in docker compared to `service`
# For more info see docker/docker issue #7459
which systemctl && mv "$(which systemctl)" /bin/no_systemctl
# debconf-apt-progress seems to hang so get rid of it too
which debconf-apt-progress && mv "$(which debconf-apt-progress)" /bin/no_debconf-apt-progress
# Get the install functions
wget -O "$PIHOLE_INSTALL" https://raw.githubusercontent.com/pi-hole/pi-hole/${CORE_TAG}/automated%20install/basic-install.sh
PH_TEST=true . "${PIHOLE_INSTALL}"
# Run only what we need from installer
export USER=pihole
if [[ "$TAG" == 'debian' ]] ; then
distro_check
install_dependent_packages INSTALLER_DEPS[@]
install_dependent_packages PIHOLE_DEPS[@]
install_dependent_packages PIHOLE_WEB_DEPS[@]
sed -i "/sleep 2/ d" /etc/init.d/dnsmasq # SLOW
# IPv6 support for nc openbsd better than traditional
apt-get install -y --force-yes netcat-openbsd
fi
piholeGitUrl="${piholeGitUrl}"
webInterfaceGitUrl="${webInterfaceGitUrl}"
webInterfaceDir="${webInterfaceDir}"
git clone "${piholeGitUrl}" "${PI_HOLE_LOCAL_REPO}"
git clone "${webInterfaceGitUrl}" "${webInterfaceDir}"
export PIHOLE_INTERFACE=eth0
export IPV4_ADDRESS=0.0.0.0
export IPV6_ADDRESS=0:0:0:0:0:0
export PIHOLE_DNS_1=8.8.8.8
export PIHOLE_DNS_2=8.8.4.4
export QUERY_LOGGING=true
tmpLog="/tmp/pihole-install.log"
installLogLoc="${installLogLoc}"
installPihole | tee "${tmpLog}"
mv "${tmpLog}" /
if [[ $USE_DEVELOPMENT_BRANCHES == true ]] ; then
ln -s /bin/true /usr/local/bin/service
echo y | bash -x pihole checkout core development
echo y | bash -x pihole checkout web devel
echo y | bash -x pihole checkout ftl development
unlink /usr/local/bin/service
else
# Reset to our tags so version numbers get detected correctly
pushd "${PI_HOLE_LOCAL_REPO}"; git reset --hard "${CORE_TAG}"; popd;
pushd "${webInterfaceDir}"; git reset --hard "${WEB_TAG}"; popd;
fi
sed -i 's/readonly //g' /opt/pihole/webpage.sh
sed -i $'s/helpFunc() {/unsupportedFunc() {\\\n echo "Function not supported in Docker images"\\\n exit 0\\\n}\\\n\\\nhelpFunc() {/g' /usr/local/bin/pihole
# Replace references to `updatePiholeFunc` with new `unsupportedFunc`
sed -i $'s/updatePiholeFunc;;/unsupportedFunc;;/g' /usr/local/bin/pihole
touch /.piholeFirstBoot
# Fix dnsmasq in docker
grep -q '^user=root' || echo -e '\nuser=root' >> /etc/dnsmasq.conf
echo 'Docker install successful'

View File

@@ -1,49 +0,0 @@
applist:
image: jwilder/nginx-proxy
ports:
- '80:80'
environment:
DEFAULT_HOST: pihole.yourDomain.lan
volumes:
- '/var/run/docker.sock:/tmp/docker.sock'
restart: always
pihole:
image: diginc/pi-hole:latest
ports:
- '53:53/tcp'
- '53:53/udp'
- '8053:80/tcp'
volumes:
- '/var/log/pihole.log:/var/log/pihole.log'
#net: host
cap_add:
- NET_ADMIN
environment:
ServerIP: 192.168.41.55
PROXY_LOCATION: pihole
VIRTUAL_HOST: pihole.yourDomain.lan
VIRTUAL_PORT: 80
extra_hosts:
# Resolve to nothing domains (terminate connection)
- 'nw2master.bioware.com nwn2.master.gamespy.com:0.0.0.0'
# LAN hostnames for other docker containers using jwilder
- 'yourDomain.lan:192.168.41.55'
- 'pihole pihole.yourDomain.lan:192.168.41.55'
- 'ghost ghost.yourDomain.lan:192.168.41.55'
- 'wordpress wordpress.yourDomain.lan:192.168.41.55'
restart: always
# Another container you might want to have running through the proxy
# Note it also have ENV Vars like pihole and a host under pihole's extra_hosts
#ghost:
# image: fractalf/ghost
# ports:
# - '2368:2368/tcp'
# volumes:
# - '/etc/ghost/:/ghost-override'
# environment:
# PROXY_LOCATION: ghost
# VIRTUAL_HOST: ghost.yourDomain.lan
# VIRTUAL_PORT: 2368
# restart: always

View File

@@ -1,7 +0,0 @@
docker-compose
jinja2
pytest
pytest-cov
pytest-xdist
testinfra==1.5.1
tox

View File

@@ -1,17 +0,0 @@
#!/usr/bin/with-contenv bash
set
bashCmd='bash -e'
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
bashCmd='bash -e -x'
fi
# Start dnsmasq for validate_env and gravity.sh
dnsmasq -7 /etc/dnsmasq.d
$bashCmd /start.sh
gravity.sh
# Kill dnsmasq because s6 won't like it if it's running when s6 services start
kill -9 $(pgrep dnsmasq) || true

View File

@@ -1 +0,0 @@
/etc/resolv.conf false doesntexist,0:1000 0664 0664

View File

@@ -1,5 +0,0 @@
#!/usr/bin/with-contenv bash
s6-echo "Starting crond"
exec -c
fdmove -c 2 1 /usr/sbin/cron -f

View File

@@ -1,3 +0,0 @@
#!/usr/bin/with-contenv bash
kill -9 $(pgrep dnsmasq)

View File

@@ -1,5 +0,0 @@
#!/usr/bin/with-contenv bash
s6-echo "Starting dnsmasq"
s6-setuidgid root dnsmasq -7 /etc/dnsmasq.d --no-daemon

View File

@@ -1,5 +0,0 @@
#!/usr/bin/with-contenv bash
s6-echo "Starting lighttpd"
lighttpd -D -f /etc/lighttpd/lighttpd.conf

View File

@@ -1,4 +0,0 @@
#!/usr/bin/with-contenv bash
s6-echo "Starting pihole-FTL ($FTL_CMD)"
pihole-FTL ${FTL_CMD}

View File

@@ -1,10 +0,0 @@
#!/usr/bin/with-contenv sh
#
# This script will determine the network IP of the container.
#
# Return format should be a single IP address.
#
# Default to using the value of the $HOSTNAME ENV variable.
getent hosts ${1:-$HOSTNAME} | awk '{print $1}'

View File

@@ -1,12 +0,0 @@
#!/usr/bin/execlineb -S0
if { s6-test $# -eq 2 }
backtick -in FILENAME {
pipeline { s6-echo "${1}" }
tr "a-z" "A-Z"
}
import -u FILENAME
redirfd -w 1 /var/run/s6/container_environment/${FILENAME}
s6-echo -n -- ${2}

View File

@@ -1,30 +0,0 @@
#!/bin/bash
# This script patches all service commands into the appropriate s6- commands
# pi-hole upstream scripts need a 'service' interface. why not systemd? docker said so.
start() {
s6-svc -wU -u -T2500 /var/run/s6/services/$service
}
stop() {
s6-svc -wD -d -T2500 /var/run/s6/services/$service
}
restart() {
stop
start
#s6-svc -t -wR -T5000 /var/run/s6/services/$service
}
status() {
s6-svstat /var/run/s6/services/$service
}
service="$1"
command="$2"
if [[ ! -d "/var/run/s6/services/$service" ]] ; then
echo "s6 service not found for $service, exiting..."
exit
fi;
${command} "${service}"

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# A shim to make busybox timeout take in debian style args
# v1 only need support for this style: `timeout 1 getent hosts github.com`
# Busybox args:
# Usage: timeout [-t SECS] [-s SIG] PROG ARGS
# Debian args:
# Usage: timeout [OPTION] DURATION COMMAND [ARG]...
# or: timeout [OPTION]
TIMEOUT=/usr/bin/timeout
SECS="${1}"
ARGS="${@:2}"
$TIMEOUT -t $SECS $ARGS

View File

@@ -1,6 +0,0 @@
from setuptools import setup
setup(
setup_requires=['pytest-runner'],
tests_require=['pytest'],
)

5
src/.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
**/*.sw*
.tox
.git
**/__pycache__
.pipenv

40
src/Dockerfile Normal file
View File

@@ -0,0 +1,40 @@
ARG PIHOLE_BASE
FROM "${PIHOLE_BASE:-ghcr.io/pi-hole/docker-pi-hole-base:bullseye-slim}"
ARG PIHOLE_DOCKER_TAG
RUN echo "${PIHOLE_DOCKER_TAG}" > /pihole.docker.tag
ENTRYPOINT [ "/s6-init" ]
COPY s6/debian-root /
COPY s6/service /usr/local/bin/service
RUN bash -ex install.sh 2>&1 && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*
# php config start passes special ENVs into
ARG PHP_ENV_CONFIG
ENV PHP_ENV_CONFIG /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
ARG PHP_ERROR_LOG
ENV PHP_ERROR_LOG /var/log/lighttpd/error-pihole.log
# IPv6 disable flag for networks/devices that do not support it
ENV IPv6 True
EXPOSE 53 53/udp
EXPOSE 67/udp
EXPOSE 80
ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME 0
ENV FTLCONF_LOCAL_IPV4 0.0.0.0
ENV FTL_CMD no-daemon
ENV DNSMASQ_USER pihole
ENV PATH /opt/pihole:${PATH}
HEALTHCHECK CMD dig +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1
SHELL ["/bin/bash", "-c"]

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,2 @@
#!/command/execlineb
background { bash -e /usr/local/bin/_postFTL.sh }

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,2 @@
#!/command/execlineb
foreground { bash -e /usr/local/bin/_startup.sh }

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1,2 @@
#!/command/execlineb
foreground { bash -e /usr/local/bin/_uid-gid-changer.sh }

View File

@@ -0,0 +1,4 @@
#!/command/with-contenv bash
s6-echo "Stopping cron"
killall -9 cron

View File

@@ -0,0 +1,3 @@
#!/command/with-contenv bash
exec -c
fdmove -c 2 1 /usr/sbin/cron -f

View File

@@ -0,0 +1 @@
longrun

View File

@@ -0,0 +1,8 @@
#!/command/with-contenv bash
s6-echo "Stopping lighttpd-access-log"
pid=$(ps -C cat -o pid=,args= |grep -oP "([0-9]+).+access\.log" |cut -f1 -d" ")
if [[ -n ${pid} ]]; then
kill -9 ${pid}
fi
s6-echo "Stopped lighttpd-access-log"

View File

@@ -0,0 +1,5 @@
#!/command/with-contenv bash
s6-echo "Starting lighttpd-access-log"
s6-setuidgid www-data cat /var/log/lighttpd/access-pihole.log 2>&1

View File

@@ -0,0 +1 @@
longrun

View File

@@ -0,0 +1,8 @@
#!/command/with-contenv bash
s6-echo "Stopping lighttpd-error-log"
pid=$(ps -C cat -o pid=,args= |grep -oP "([0-9]+).+error\.log" |cut -f1 -d" ")
if [[ -n ${pid} ]]; then
kill -9 ${pid}
fi
s6-echo "Stopped lighttpd-error-log"

View File

@@ -0,0 +1,5 @@
#!/command/with-contenv bash
s6-echo "Starting lighttpd-error-log"
s6-setuidgid www-data cat /var/log/lighttpd/error-pihole.log 2>&1

View File

@@ -0,0 +1 @@
longrun

View File

@@ -0,0 +1,6 @@
#!/command/with-contenv bash
s6-echo "Stopping lighttpd"
service lighttpd-access-log stop
service lighttpd-error-log stop
killall -9 lighttpd

View File

@@ -0,0 +1,34 @@
#!/command/with-contenv bash
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
fi
if [[ 1 -eq ${WEBLOGS_STDOUT:-0} ]]; then
#lighthttpd cannot use /dev/stdout https://redmine.lighttpd.net/issues/2731
for fi in /var/log/lighttpd/access-pihole.log /var/log/lighttpd/error-pihole.log
do
if [[ ! -p ${fi} ]]; then
rm -f ${fi}
mkfifo -m 600 ${fi}
fi
done
chown -R www-data:www-data /var/log/lighttpd
service lighttpd-access-log start
service lighttpd-error-log start
sleep 2
else
#remove fifo if exists
[[ -p /var/log/lighttpd/access-pihole.log ]] && rm -Rf /var/log/lighttpd/access-pihole.log
[[ -p /var/log/lighttpd/error-pihole.log ]] && rm -Rf /var/log/lighttpd/error-pihole.log
# install /dev/null log files to ensure they exist (create if non-existing, preserve if existing)
[[ ! -f /var/log/lighttpd/access-pihole.log ]] && install /dev/null /var/log/lighttpd/access-pihole.log
[[ ! -f /var/log/lighttpd/error-pihole.log ]] && install /dev/null /var/log/lighttpd/error-pihole.log
# Ensure that permissions are set so that lighttpd can write to the logs
chown -R www-data:www-data /var/log/lighttpd
chmod 0644 /var/log/lighttpd/access-pihole.log /var/log/lighttpd/error-pihole.log
fi
lighttpd -D -f /etc/lighttpd/lighttpd.conf

View File

@@ -0,0 +1 @@
longrun

View File

@@ -0,0 +1,4 @@
#!/command/with-contenv bash
s6-echo "Stopping pihole-FTL"
killall -15 pihole-FTL

View File

@@ -0,0 +1,47 @@
#!/command/with-contenv bash
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
fi
# Remove possible leftovers from previous pihole-FTL processes
rm -f /dev/shm/FTL-* 2> /dev/null
rm /run/pihole/FTL.sock 2> /dev/null
# install /dev/null files to ensure they exist (create if non-existing, preserve if existing)
mkdir -pm 0755 /run/pihole /var/log/pihole
[[ ! -f /run/pihole-FTL.pid ]] && install /dev/null /run/pihole-FTL.pid
[[ ! -f /var/log/pihole/FTL.log ]] && install /dev/null /var/log/pihole/FTL.log
[[ ! -f /var/log/pihole/pihole.log ]] && install /dev/null /var/log/pihole/pihole.log
[[ ! -f /etc/pihole/dhcp.leases ]] && install /dev/null /etc/pihole/dhcp.leases
# Ensure that permissions are set so that pihole-FTL can edit all necessary files
chown pihole:pihole /run/pihole-FTL.pid /var/log/pihole/FTL.log /var/log/pihole/pihole.log /etc/pihole/dhcp.leases /run/pihole /etc/pihole
chmod 0644 /run/pihole-FTL.pid /var/log/pihole/FTL.log /var/log/pihole/pihole.log /etc/pihole/dhcp.leases
# Ensure that permissions are set so that pihole-FTL can edit the files. We ignore errors as the file may not (yet) exist
chmod -f 0644 /etc/pihole/macvendor.db
# Chown database files to the user FTL runs as. We ignore errors as the files may not (yet) exist
chown -f pihole:pihole /etc/pihole/pihole-FTL.db /etc/pihole/gravity.db /etc/pihole/macvendor.db
# Chown database file permissions so that the pihole group (web interface) can edit the file. We ignore errors as the files may not (yet) exist
chmod -f 0664 /etc/pihole/pihole-FTL.db
# Backward compatibility for user-scripts that still expect log files in /var/log instead of /var/log/pihole/
# Should be removed with Pi-hole v6.0
if [ ! -f /var/log/pihole.log ]; then
ln -s /var/log/pihole/pihole.log /var/log/pihole.log
chown -h pihole:pihole /var/log/pihole.log
fi
if [ ! -f /var/log/pihole-FTL.log ]; then
ln -s /var/log/pihole/FTL.log /var/log/pihole-FTL.log
chown -h pihole:pihole /var/log/pihole-FTL.log
fi
# Call capsh with the detected capabilities
capsh --inh=${CAP_STR:1} --addamb=${CAP_STR:1} --user=$DNSMASQ_USER --keep=1 -- -c "/usr/bin/pihole-FTL $FTL_CMD >/dev/null 2>&1"
# Notes on above:
# - DNSMASQ_USER default of pihole is in Dockerfile & can be overwritten by runtime container env
# - /var/log/pihole/pihole*.log has FTL's output that no-daemon would normally print in FG too
# prevent duplicating it in docker logs by sending to dev null

View File

@@ -0,0 +1 @@
longrun

View File

@@ -0,0 +1,33 @@
#!/bin/bash
# This script contains function calls and lines that may rely on pihole-FTL to be running, it is run as part of a oneshot service on container startup
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
fi
gravityDBfile="/etc/pihole/gravity.db"
config_file="/etc/pihole/pihole-FTL.conf"
# make a point to mention which config file we're checking, as breadcrumb to revisit if/when pihole-FTL.conf is succeeded by TOML
echo " Checking if custom gravity.db is set in ${config_file}"
if [[ -f "${config_file}" ]]; then
gravityDBfile="$(grep --color=never -Po "^GRAVITYDB=\K.*" "${config_file}" 2> /dev/null || echo "/etc/pihole/gravity.db")"
fi
if [ -z "$SKIPGRAVITYONBOOT" ] || [ ! -f "${gravityDBfile}" ]; then
if [ -n "$SKIPGRAVITYONBOOT" ];then
echo " SKIPGRAVITYONBOOT is set, however ${gravityDBfile} does not exist (Likely due to a fresh volume). This is a required file for Pi-hole to operate."
echo " Ignoring SKIPGRAVITYONBOOT on this occaision."
fi
pihole -g
else
echo " Skipping Gravity Database Update."
fi
# Run update checker to check for newer container, and display version output
echo ""
pihole updatechecker
pihole -v
DOCKER_TAG=$(cat /pihole.docker.tag)
echo " Container tag is: ${DOCKER_TAG}"
echo ""

View File

@@ -0,0 +1,74 @@
#!/bin/bash -e
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
fi
# The below functions are all contained in bash_functions.sh
# shellcheck source=/dev/null
. /usr/local/bin/bash_functions.sh
# shellcheck source=/dev/null
SKIP_INSTALL=true . /etc/.pihole/automated\ install/basic-install.sh
echo " [i] Starting docker specific checks & setup for docker pihole/pihole"
# TODO:
#if [ ! -f /.piholeFirstBoot ] ; then
# echo " [i] Not first container startup so not running docker's setup, re-create container to run setup again"
#else
# regular_setup_functions
#fi
# Initial checks
# ===========================
fix_capabilities
validate_env || exit 1
ensure_basic_configuration
# Web interface setup
# ===========================
setup_web_port
load_web_password_secret
setup_web_password
setup_web_theme
setup_web_temp_unit
setup_web_layout
setup_web_php_env
# lighttpd setup
# ===========================
setup_ipv4_ipv6
setup_lighttpd_bind
# Misc Setup
# ===========================
setup_blocklists
# FTL setup
# ===========================
setup_FTL_upstream_DNS
[[ -n "${DHCP_ACTIVE}" && ${DHCP_ACTIVE} == "true" ]] && echo "Setting DHCP server" && setup_FTL_dhcp
apply_FTL_Configs_From_Env
setup_FTL_User
setup_FTL_Interface
setup_FTL_ListeningBehaviour
setup_FTL_CacheSize
setup_FTL_query_logging
setup_FTL_server || true
[ -n "${DNS_FQDN_REQUIRED}" ] && change_setting "DNS_FQDN_REQUIRED" "$DNS_FQDN_REQUIRED"
[ -n "${DNSSEC}" ] && change_setting "DNSSEC" "$DNSSEC"
[ -n "${DNS_BOGUS_PRIV}" ] && change_setting "DNS_BOGUS_PRIV" "$DNS_BOGUS_PRIV"
# The following must be called last! It will source setupVars.conf and override any env vars users pass in before they have been applied
setup_FTL_ProcessDNSSettings
test_configs
[ -f /.piholeFirstBoot ] && rm /.piholeFirstBoot
echo " [i] Docker start setup complete"
echo ""
echo " [i] pihole-FTL ($FTL_CMD) will be started as ${DNSMASQ_USER}"
echo ""

View File

@@ -0,0 +1,35 @@
#!/bin/bash
set -e
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x ;
fi
modifyUser()
{
declare username=${1:-} newId=${2:-}
[[ -z ${username} || -z ${newId} ]] && return
local currentId=$(id -u ${username})
[[ ${currentId} -eq ${newId} ]] && return
echo " [i] Changing ID for user: ${username} (${currentId} => ${newId})"
usermod -o -u ${newId} ${username}
}
modifyGroup()
{
declare groupname=${1:-} newId=${2:-}
[[ -z ${groupname} || -z ${newId} ]] && return
local currentId=$(id -g ${groupname})
[[ ${currentId} -eq ${newId} ]] && return
echo " [i] Changing ID for group: ${groupname} (${currentId} => ${newId})"
groupmod -o -g ${newId} ${groupname}
}
modifyUser www-data ${WEB_UID}
modifyGroup www-data ${WEB_GID}
modifyUser pihole ${PIHOLE_UID}
modifyGroup pihole ${PIHOLE_GID}

View File

@@ -0,0 +1,523 @@
#!/bin/bash
# If user has set QUERY_LOGGING Env Var, copy it out to _OVERRIDE,
# else it will get overridden itself when we source basic-install.sh
[ -n "${QUERY_LOGGING}" ] && export QUERY_LOGGING_OVERRIDE="${QUERY_LOGGING}"
# Legacy Env Vars preserved for backwards compatibility - convert them to FTLCONF_ equivalents
[ -n "${ServerIP}" ] && echo "ServerIP is deprecated. Converting to FTLCONF_LOCAL_IPV4" && export "FTLCONF_LOCAL_IPV4"="$ServerIP"
[ -n "${ServerIPv6}" ] && echo "ServerIPv6 is deprecated. Converting to FTLCONF_LOCAL_IPV6" && export "FTLCONF_LOCAL_IPV6"="$ServerIPv6"
# Previously used FTLCONF_ equivalent has since been deprecated, also convert this one
[ -n "${FTLCONF_REPLY_ADDR4}" ] && echo "FTLCONF_REPLY_ADDR4 is deprecated. Converting to FTLCONF_LOCAL_IPV4" && export "FTLCONF_LOCAL_IPV4"="$FTLCONF_REPLY_ADDR4"
[ -n "${FTLCONF_REPLY_ADDR6}" ] && echo "FTLCONF_REPLY_ADDR6 is deprecated. Converting to FTLCONF_LOCAL_IPV6" && export "FTLCONF_LOCAL_IPV6"="$FTLCONF_REPLY_ADDR6"
# Some of the bash_functions use utilities from Pi-hole's utils.sh
# shellcheck disable=SC2154
# shellcheck source=/dev/null
. /opt/pihole/utils.sh
export setupVars="/etc/pihole/setupVars.conf"
export FTLconf="/etc/pihole/pihole-FTL.conf"
export dnsmasqconfig="/etc/dnsmasq.d/01-pihole.conf"
export adlistFile="/etc/pihole/adlists.list"
change_setting() {
addOrEditKeyValPair "${setupVars}" "${1}" "${2}"
}
changeFTLsetting() {
addOrEditKeyValPair "${FTLconf}" "${1}" "${2}"
}
fix_capabilities() {
# Testing on Docker 20.10.14 with no caps set shows the following caps available to the container:
# Current: cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_raw,cap_sys_chroot,cap_mknod,cap_audit_write,cap_setfcap=ep
# FTL can also use CAP_NET_ADMIN and CAP_SYS_NICE. If we try to set them when they haven't been explicitly enabled, FTL will not start. Test for them first:
echo " [i] Setting capabilities on pihole-FTL where possible"
/sbin/capsh --has-p=cap_chown 2>/dev/null && CAP_STR+=',CAP_CHOWN'
/sbin/capsh --has-p=cap_net_bind_service 2>/dev/null && CAP_STR+=',CAP_NET_BIND_SERVICE'
/sbin/capsh --has-p=cap_net_raw 2>/dev/null && CAP_STR+=',CAP_NET_RAW'
/sbin/capsh --has-p=cap_net_admin 2>/dev/null && CAP_STR+=',CAP_NET_ADMIN' || DHCP_READY='false'
/sbin/capsh --has-p=cap_sys_nice 2>/dev/null && CAP_STR+=',CAP_SYS_NICE'
if [[ ${CAP_STR} ]]; then
# We have the (some of) the above caps available to us - apply them to pihole-FTL
echo " [i] Applying the following caps to pihole-FTL:"
IFS=',' read -ra CAPS <<< "${CAP_STR:1}"
for i in "${CAPS[@]}"; do
echo " * ${i}"
done
setcap ${CAP_STR:1}+ep "$(which pihole-FTL)" || ret=$?
if [[ $DHCP_READY == false ]] && [[ $DHCP_ACTIVE == true ]]; then
# DHCP is requested but NET_ADMIN is not available.
echo "ERROR: DHCP requested but NET_ADMIN is not available. DHCP will not be started."
echo " Please add cap_net_admin to the container's capabilities or disable DHCP."
DHCP_ACTIVE='false'
change_setting "DHCP_ACTIVE" "false"
fi
if [[ $ret -ne 0 && "${DNSMASQ_USER:-pihole}" != "root" ]]; then
echo " [!] ERROR: Unable to set capabilities for pihole-FTL. Cannot run as non-root."
echo " If you are seeing this error, please set the environment variable 'DNSMASQ_USER' to the value 'root'"
exit 1
fi
else
echo " [!] WARNING: Unable to set capabilities for pihole-FTL."
echo " Please ensure that the container has the required capabilities."
exit 1
fi
}
# shellcheck disable=SC2034
ensure_basic_configuration() {
echo " [i] Ensuring basic configuration by re-running select functions from basic-install.sh"
# Set Debian webserver variables for installConfigs
LIGHTTPD_USER="www-data"
LIGHTTPD_GROUP="www-data"
LIGHTTPD_CFG="lighttpd.conf.debian"
installConfigs
installLogrotate || true #installLogRotate can return 2 or 3, but we are still OK to continue in that case
if [ ! -f "${setupVars}" ]; then
install -m 644 /dev/null "${setupVars}"
echo " [i] Creating empty ${setupVars} file."
# The following setting needs to exist else the web interface version won't show in pihole -v
change_setting "INSTALL_WEB_INTERFACE" "true"
fi
set +e
mkdir -p /var/run/pihole /var/log/pihole
touch /var/log/pihole/FTL.log /var/log/pihole/pihole.log
chown pihole:root /etc/lighttpd
# In case of `pihole` UID being changed, re-chown the pihole scripts and pihole command
chown -R pihole:root "${PI_HOLE_INSTALL_DIR}"
chown pihole:root "${PI_HOLE_BIN_DIR}/pihole"
set -e
# Re-write all of the setupVars to ensure required ones are present (like QUERY_LOGGING)
# If the setup variable file exists,
if [[ -e "${setupVars}" ]]; then
cp -f "${setupVars}" "${setupVars}.update.bak"
fi
# Remove any existing macvendor.db and replace it with a symblink to the one moved to the root directory (see install.sh)
if [[ -f "/etc/pihole/macvendor.db" ]]; then
rm /etc/pihole/macvendor.db
fi
ln -s /macvendor.db /etc/pihole/macvendor.db
# When fresh empty directory volumes are used then we need to create this file
if [ ! -f /etc/dnsmasq.d/01-pihole.conf ] ; then
cp /etc/.pihole/advanced/01-pihole.conf /etc/dnsmasq.d/
fi;
# setup_or_skip_gravity
}
validate_env() {
# Optional FTLCONF_LOCAL_IPV4 is a valid IP
# nc won't throw any text based errors when it times out connecting to a valid IP, otherwise it complains about the DNS name being garbage
# if nc doesn't behave as we expect on a valid IP the routing table should be able to look it up and return a 0 retcode
if [[ "$(nc -4 -w1 -z "$FTLCONF_LOCAL_IPV4" 53 2>&1)" != "" ]] && ! ip route get "$FTLCONF_LOCAL_IPV4" > /dev/null ; then
echo "ERROR: FTLCONF_LOCAL_IPV4 Environment variable ($FTLCONF_LOCAL_IPV4) doesn't appear to be a valid IPv4 address"
exit 1
fi
# Optional IPv6 is a valid address
if [[ -n "$FTLCONF_LOCAL_IPV6" ]] ; then
if [[ "$FTLCONF_LOCAL_IPV6" == 'kernel' ]] ; then
echo " [!] ERROR: You passed in IPv6 with a value of 'kernel', this maybe because you do not have IPv6 enabled on your network"
unset FTLCONF_LOCAL_IPV6
exit 1
fi
if [[ "$(nc -6 -w1 -z "$FTLCONF_LOCAL_IPV6" 53 2>&1)" != "" ]] && ! ip route get "$FTLCONF_LOCAL_IPV6" > /dev/null ; then
echo " [!] ERROR: FTLCONF_LOCAL_IPV6 Environment variable ($FTLCONF_LOCAL_IPV6) doesn't appear to be a valid IPv6 address"
echo " TIP: If your server is not IPv6 enabled just remove '-e FTLCONF_LOCAL_IPV6' from your docker container"
exit 1
fi
fi;
}
setup_FTL_User(){
# Run DNSMASQ as root user to avoid SHM permission issues
if grep -r -q '^\s*user=' /etc/dnsmasq.* ; then
# Change user that had been set previously to root
for f in $(grep -r -l '^\s*user=' /etc/dnsmasq.*); do
sed -i "/^\s*user=/ c\user=${DNSMASQ_USER}" "${f}"
done
else
echo -e "\nuser=${DNSMASQ_USER}" >> /etc/dnsmasq.conf
fi
}
setup_FTL_Interface(){
local interface="${INTERFACE:-eth0}"
# Set the interface for FTL to listen on
local interfaceType='default'
if [ "$interface" != 'eth0' ] ; then
interfaceType='custom'
fi;
echo " [i] FTL binding to $interfaceType interface: $interface"
change_setting "PIHOLE_INTERFACE" "${interface}"
}
setup_FTL_ListeningBehaviour(){
if [ -n "$DNSMASQ_LISTENING" ]; then
change_setting "DNSMASQ_LISTENING" "${DNSMASQ_LISTENING}"
fi;
}
setup_FTL_CacheSize() {
local warning=" [i] WARNING: CUSTOM_CACHE_SIZE not used"
local dnsmasq_pihole_01_location="/etc/dnsmasq.d/01-pihole.conf"
# Quietly exit early for empty or default
if [[ -z "${CUSTOM_CACHE_SIZE}" || "${CUSTOM_CACHE_SIZE}" == '10000' ]] ; then return ; fi
if [[ "${DNSSEC}" == "true" ]] ; then
echo "$warning - Cannot change cache size if DNSSEC is enabled"
return
fi
if ! echo "$CUSTOM_CACHE_SIZE" | grep -q '^[0-9]*$' ; then
echo "$warning - $CUSTOM_CACHE_SIZE is not an integer"
return
fi
local -i custom_cache_size="$CUSTOM_CACHE_SIZE"
if (( custom_cache_size < 0 )); then
echo "$warning - $custom_cache_size is not a positive integer or zero"
return
fi
echo " [i] Custom CUSTOM_CACHE_SIZE set to $custom_cache_size"
change_setting "CACHE_SIZE" "$custom_cache_size"
sed -i "s/^cache-size=\s*[0-9]*/cache-size=$custom_cache_size/" ${dnsmasq_pihole_01_location}
}
apply_FTL_Configs_From_Env(){
# Get all exported environment variables starting with FTLCONF_ as a prefix and call the changeFTLsetting
# function with the environment variable's suffix as the key. This allows applying any pihole-FTL.conf
# setting defined here: https://docs.pi-hole.net/ftldns/configfile/
declare -px | grep FTLCONF_ | sed -E 's/declare -x FTLCONF_([^=]+)=\"(.+)\"/\1 \2/' | while read -r name value
do
echo " [i] Applying pihole-FTL.conf setting $name=$value"
changeFTLsetting "$name" "$value"
done
}
setup_FTL_dhcp() {
if [ -z "${DHCP_START}" ] || [ -z "${DHCP_END}" ] || [ -z "${DHCP_ROUTER}" ]; then
echo " [!] ERROR: Won't enable DHCP server because mandatory Environment variables are missing: DHCP_START, DHCP_END and/or DHCP_ROUTER"
change_setting "DHCP_ACTIVE" "false"
else
change_setting "DHCP_ACTIVE" "${DHCP_ACTIVE}"
change_setting "DHCP_START" "${DHCP_START}"
change_setting "DHCP_END" "${DHCP_END}"
change_setting "DHCP_ROUTER" "${DHCP_ROUTER}"
change_setting "DHCP_LEASETIME" "${DHCP_LEASETIME}"
change_setting "PIHOLE_DOMAIN" "${PIHOLE_DOMAIN}"
change_setting "DHCP_IPv6" "${DHCP_IPv6}"
change_setting "DHCP_rapid_commit" "${DHCP_rapid_commit}"
fi
}
setup_FTL_query_logging(){
if [ "${QUERY_LOGGING_OVERRIDE}" == "false" ]; then
echo " [i] Disabling Query Logging"
change_setting "QUERY_LOGGING" "$QUERY_LOGGING_OVERRIDE"
removeKey "${dnsmasqconfig}" log-queries
else
# If it is anything other than false, set it to true
change_setting "QUERY_LOGGING" "true"
# Set pihole logging on for good measure
echo " [i] Enabling Query Logging"
addKey "${dnsmasqconfig}" log-queries
fi
}
setup_FTL_server(){
[ -n "${REV_SERVER}" ] && change_setting "REV_SERVER" "$REV_SERVER"
[ -n "${REV_SERVER_DOMAIN}" ] && change_setting "REV_SERVER_DOMAIN" "$REV_SERVER_DOMAIN"
[ -n "${REV_SERVER_TARGET}" ] && change_setting "REV_SERVER_TARGET" "$REV_SERVER_TARGET"
[ -n "${REV_SERVER_CIDR}" ] && change_setting "REV_SERVER_CIDR" "$REV_SERVER_CIDR"
if [ -z "$REV_SERVER" ];then
# If the REV_SERVER* variables are set, then there is no need to add these.
# If it is not set, then adding these variables is fine, and they will be converted by the Pi-hole install script
[ -n "${CONDITIONAL_FORWARDING}" ] && change_setting "CONDITIONAL_FORWARDING" "$CONDITIONAL_FORWARDING"
[ -n "${CONDITIONAL_FORWARDING_IP}" ] && change_setting "CONDITIONAL_FORWARDING_IP" "$CONDITIONAL_FORWARDING_IP"
[ -n "${CONDITIONAL_FORWARDING_DOMAIN}" ] && change_setting "CONDITIONAL_FORWARDING_DOMAIN" "$CONDITIONAL_FORWARDING_DOMAIN"
[ -n "${CONDITIONAL_FORWARDING_REVERSE}" ] && change_setting "CONDITIONAL_FORWARDING_REVERSE" "$CONDITIONAL_FORWARDING_REVERSE"
fi
}
setup_FTL_upstream_DNS(){
if [ -z "${PIHOLE_DNS_}" ]; then
# For backward compatibility, if DNS1 and/or DNS2 are set, but PIHOLE_DNS_ is not, convert them to
# a semi-colon delimited string and store in PIHOLE_DNS_
# They are not used anywhere if PIHOLE_DNS_ is set already
[ -n "${DNS1}" ] && echo " [i] Converting DNS1 to PIHOLE_DNS_" && PIHOLE_DNS_="$DNS1"
[[ -n "${DNS2}" && "${DNS2}" != "no" ]] && echo " [i] Converting DNS2 to PIHOLE_DNS_" && PIHOLE_DNS_="$PIHOLE_DNS_;$DNS2"
fi
# Parse the PIHOLE_DNS variable, if it exists, and apply upstream servers to Pi-hole config
if [ -n "${PIHOLE_DNS_}" ]; then
echo " [i] Setting DNS servers based on PIHOLE_DNS_ variable"
# Remove any PIHOLE_DNS_ entries from setupVars.conf, if they exist
sed -i '/PIHOLE_DNS_/d' /etc/pihole/setupVars.conf
# Split into an array (delimited by ;)
# Loop through and add them one by one to setupVars.conf
IFS=";" read -r -a PIHOLE_DNS_ARR <<< "${PIHOLE_DNS_}"
count=1
valid_entries=0
for i in "${PIHOLE_DNS_ARR[@]}"; do
# Ensure we don't have an empty value first (see https://github.com/pi-hole/docker-pi-hole/issues/1174#issuecomment-1228763422 )
if [ -n "$i" ]; then
if valid_ip "$i" || valid_ip6 "$i" ; then
change_setting "PIHOLE_DNS_$count" "$i"
((count=count+1))
((valid_entries=valid_entries+1))
continue
fi
# shellcheck disable=SC2086
if [ -n "$(dig +short ${i//#*/})" ]; then
# If the "address" is a domain (for example a docker link) then try to resolve it and add
# the result as a DNS server in setupVars.conf.
resolved_ip="$(dig +short ${i//#*/} | head -n 1)"
if [ -n "${i//*#/}" ] && [ "${i//*#/}" != "${i//#*/}" ]; then
resolved_ip="${resolved_ip}#${i//*#/}"
fi
echo "Resolved ${i} from PIHOLE_DNS_ as: ${resolved_ip}"
if valid_ip "$resolved_ip" || valid_ip6 "$resolved_ip" ; then
change_setting "PIHOLE_DNS_$count" "$resolved_ip"
((count=count+1))
((valid_entries=valid_entries+1))
continue
fi
fi
# If the above tests fail then this is an invalid DNS server
echo " [!] Invalid entry detected in PIHOLE_DNS_: ${i}"
fi
done
if [ $valid_entries -eq 0 ]; then
echo " [!] No Valid entries detected in PIHOLE_DNS_. Aborting"
exit 1
fi
else
# Environment variable has not been set, but there may be existing values in an existing setupVars.conf
# if this is the case, we do not want to overwrite these with the defaults of 8.8.8.8 and 8.8.4.4
# Pi-hole can run with only one upstream configured, so we will just check for one.
setupVarsDNS="$(grep 'PIHOLE_DNS_' /etc/pihole/setupVars.conf || true)"
if [ -z "${setupVarsDNS}" ]; then
echo " [i] Configuring default DNS servers: 8.8.8.8, 8.8.4.4"
change_setting "PIHOLE_DNS_1" "8.8.8.8"
change_setting "PIHOLE_DNS_2" "8.8.4.4"
else
echo " [i] Existing DNS servers detected in setupVars.conf. Leaving them alone"
fi
fi
}
setup_FTL_ProcessDNSSettings(){
# Commit settings to 01-pihole.conf
# shellcheck source=/dev/null
. /opt/pihole/webpage.sh
ProcessDNSSettings
}
setup_lighttpd_bind() {
local serverip="${FTLCONF_LOCAL_IPV4}"
# if using '--net=host' only bind lighttpd on $FTLCONF_LOCAL_IPV4 and localhost
if grep -q "docker" /proc/net/dev && [[ $serverip != 0.0.0.0 ]]; then #docker (docker0 by default) should only be present on the host system
if ! grep -q "server.bind" /etc/lighttpd/lighttpd.conf ; then # if the declaration is already there, don't add it again
sed -i -E "s/server\.port\s+\=\s+([0-9]+)/server.bind\t\t = \"${serverip}\"\nserver.port\t\t = \1\n"\$SERVER"\[\"socket\"\] == \"127\.0\.0\.1:\1\" \{\}/" /etc/lighttpd/lighttpd.conf
fi
fi
}
setup_web_php_env() {
if [ -z "$VIRTUAL_HOST" ] ; then
VIRTUAL_HOST="$FTLCONF_LOCAL_IPV4"
fi;
for config_var in "VIRTUAL_HOST" "CORS_HOSTS" "PHP_ERROR_LOG" "PIHOLE_DOCKER_TAG" "TZ"; do
local beginning_of_line="\t\t\t\"${config_var}\" => "
if grep -qP "$beginning_of_line" "$PHP_ENV_CONFIG" ; then
# replace line if already present
sed -i "/${beginning_of_line}/c\\${beginning_of_line}\"${!config_var}\"," "$PHP_ENV_CONFIG"
else
# add line otherwise
sed -i "/bin-environment/ a\\${beginning_of_line}\"${!config_var}\"," "$PHP_ENV_CONFIG"
fi
done
echo " [i] Added ENV to php:"
grep -E '(VIRTUAL_HOST|CORS_HOSTS|PHP_ERROR_LOG|PIHOLE_DOCKER_TAG|TZ)' "$PHP_ENV_CONFIG"
}
setup_web_port() {
local warning=" [!] WARNING: Custom WEB_PORT not used"
# Quietly exit early for empty or default
if [[ -z "${WEB_PORT}" || "${WEB_PORT}" == '80' ]] ; then return ; fi
if ! echo "$WEB_PORT" | grep -q '^[0-9][0-9]*$' ; then
echo "$warning - $WEB_PORT is not an integer"
return
fi
local -i web_port="$WEB_PORT"
if (( web_port < 1 || web_port > 65535 )); then
echo "$warning - $web_port is not within valid port range of 1-65535"
return
fi
echo " [i] Custom WEB_PORT set to $web_port"
echo " [i] Without proper router DNAT forwarding to $FTLCONF_LOCAL_IPV4:$web_port, you may not get any blocked websites on ads"
# Update lighttpd's port
sed -i '/server.port\s*=\s*80\s*$/ s/80/'"${WEB_PORT}"'/g' /etc/lighttpd/lighttpd.conf
}
setup_web_theme(){
# Parse the WEBTHEME variable, if it exists, and set the selected theme if it is one of the supported values.
# If an invalid theme name was supplied, setup WEBTHEME to use the default-light theme.
if [ -n "${WEBTHEME}" ]; then
case "${WEBTHEME}" in
"default-dark" | "default-darker" | "default-light" | "default-auto" | "lcars")
echo " [i] Setting Web Theme based on WEBTHEME variable, using value ${WEBTHEME}"
change_setting "WEBTHEME" "${WEBTHEME}"
;;
*)
echo " [!] Invalid theme name supplied: ${WEBTHEME}, falling back to default-light."
change_setting "WEBTHEME" "default-light"
;;
esac
fi
}
load_web_password_secret() {
# If WEBPASSWORD is not set at all, attempt to read password from WEBPASSWORD_FILE,
# allowing secrets to be passed via docker secrets
if [ -z "${WEBPASSWORD+x}" ] && [ -n "${WEBPASSWORD_FILE}" ] && [ -r "${WEBPASSWORD_FILE}" ]; then
WEBPASSWORD=$(<"${WEBPASSWORD_FILE}")
fi;
}
setup_web_password() {
if [ -z "${WEBPASSWORD+x}" ] ; then
# ENV WEBPASSWORD_OVERRIDE is not set
# Exit if setupvars already has a password
setup_var_exists "WEBPASSWORD" && return
# Generate new random password
WEBPASSWORD=$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 8)
echo " [i] Assigning random password: $WEBPASSWORD"
else
# ENV WEBPASSWORD_OVERRIDE is set and will be used
echo " [i] Assigning password defined by Environment Variable"
# WEBPASSWORD="$WEBPASSWORD"
fi
# Explicitly turn off bash printing when working with secrets
{ set +x; } 2>/dev/null
if [[ "$WEBPASSWORD" == "" ]] ; then
echo "" | pihole -a -p
else
pihole -a -p "$WEBPASSWORD" "$WEBPASSWORD"
fi
# To avoid printing this if conditional in bash debug, turn off debug above..
# then re-enable debug if necessary (more code but cleaner printed output)
if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then
set -x
fi
}
setup_ipv4_ipv6() {
local ip_versions="IPv4 and IPv6"
if [ "${IPv6,,}" != "true" ] ; then
ip_versions="IPv4"
sed -i '/use-ipv6.pl/ d' /etc/lighttpd/lighttpd.conf
fi;
echo " [i] Using $ip_versions"
}
test_configs() {
set -e
echo -n ' [i] Testing lighttpd config: '
lighttpd -t -f /etc/lighttpd/lighttpd.conf || exit 1
set +e
echo " [i] All config checks passed, cleared for startup ..."
}
setup_blocklists() {
# Exit/return early without setting up adlists with defaults for any of the following conditions:
# 1. skip_setup_blocklists env is set
exit_string="(exiting ${FUNCNAME[0]} early)"
if [ -n "${skip_setup_blocklists}" ]; then
echo " [i] skip_setup_blocklists requested $exit_string"
return
fi
# 2. The adlist file exists already (restarted container or volume mounted list)
if [ -f "${adlistFile}" ]; then
echo " [i] Preexisting ad list ${adlistFile} detected $exit_string"
return
fi
echo " [i] ${FUNCNAME[0]} now setting default blocklists up: "
echo " [i] TIP: Use a docker volume for ${adlistFile} if you want to customize for first boot"
installDefaultBlocklists
echo " [i] Blocklists (${adlistFile}) now set to:"
cat "${adlistFile}"
}
setup_var_exists() {
local KEY="$1"
if [ -n "$2" ]; then
local REQUIRED_VALUE="[^\n]+"
fi
if grep -Pq "^${KEY}=${REQUIRED_VALUE}" "$setupVars"; then
echo " [i] Pre existing ${KEY} found"
true
else
false
fi
}
setup_web_temp_unit() {
local UNIT="${TEMPERATUREUNIT}"
# check if var is empty
if [[ "$UNIT" != "" ]] ; then
# check if we have valid units
if [[ "$UNIT" == "c" || "$UNIT" == "k" || $UNIT == "f" ]] ; then
pihole -a -"${UNIT}"
fi
fi
}
setup_web_layout() {
local LO="${WEBUIBOXEDLAYOUT}"
# check if var is empty
if [[ "$LO" != "" ]] ; then
# check if we have valid types boxed | traditional
if [[ "$LO" == "traditional" || "$LO" == "boxed" ]] ; then
change_setting "WEBUIBOXEDLAYOUT" "$WEBUIBOXEDLAYOUT"
fi
fi
}

View File

@@ -0,0 +1,98 @@
#!/bin/bash -ex
# shellcheck disable=SC2034
mkdir -p /etc/pihole/
mkdir -p /var/run/pihole
CORE_LOCAL_REPO=/etc/.pihole
WEB_LOCAL_REPO=/var/www/html/admin
setupVars=/etc/pihole/setupVars.conf
detect_arch() {
DETECTED_ARCH=$(dpkg --print-architecture)
S6_ARCH=$DETECTED_ARCH
case $DETECTED_ARCH in
amd64)
S6_ARCH="x86_64";;
armel)
S6_ARCH="armhf";;
armhf)
S6_ARCH="armhf";;
arm64)
S6_ARCH="aarch64";;
i386)
S6_ARCH="i686";;
esac
}
DOCKER_TAG=$(cat /pihole.docker.tag)
# Helps to have some additional tools in the dev image when debugging
if [[ "${DOCKER_TAG}" = 'nightly' || "${DOCKER_TAG}" = 'dev' ]]; then
apt-get update
apt-get install --no-install-recommends -y nano less
rm -rf /var/lib/apt/lists/*
fi
detect_arch
S6_OVERLAY_VERSION=v3.1.1.2
curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" | tar Jxpf - -C /
curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" | tar Jxpf - -C /
# IMPORTANT: #########################################################################
# Move /init somewhere else to prevent issues with podman/RHEL #
# See: https://github.com/pi-hole/docker-pi-hole/issues/1176#issuecomment-1227587045 #
mv /init /s6-init #
######################################################################################
# Preseed variables to assist with using --unattended install
{
echo "PIHOLE_INTERFACE=eth0"
echo "IPV4_ADDRESS=0.0.0.0"
echo "IPV6_ADDRESS=0:0:0:0:0:0"
echo "PIHOLE_DNS_1=8.8.8.8"
echo "QUERY_LOGGING=true"
echo "INSTALL_WEB_SERVER=true"
echo "INSTALL_WEB_INTERFACE=true"
echo "LIGHTTPD_ENABLED=true"
}>> "${setupVars}"
source $setupVars
export USER=pihole
export PIHOLE_SKIP_OS_CHECK=true
# Run the installer in unattended mode using the preseeded variables above and --reconfigure so that local repos are not updated
curl -sSL https://install.pi-hole.net | bash -sex -- --unattended
# At this stage, if we are building a :nightly tag, then switch the Pi-hole install to dev versions
if [[ "${DOCKER_TAG}" = 'nightly' ]]; then
yes | pihole checkout dev
fi
sed -i '/^WEBPASSWORD/d' /etc/pihole/setupVars.conf
# sed a new function into the `pihole` script just above the `helpFunc()` function for later use.
sed -i $'s/helpFunc() {/unsupportedFunc() {\\\n echo "Function not supported in Docker images"\\\n exit 0\\\n}\\\n\\\nhelpFunc() {/g' /usr/local/bin/pihole
# Replace a few of the `pihole` options with calls to `unsupportedFunc`:
# pihole -up / pihole updatePihole
sed -i $'s/)\s*updatePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole
# pihole uninstall
sed -i $'s/)\s*uninstallFunc/) unsupportedFunc/g' /usr/local/bin/pihole
# pihole -r / pihole reconfigure
sed -i $'s/)\s*reconfigurePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole
# Move macvendor.db to root dir and symlink it back into /etc/pihole. See https://github.com/pi-hole/docker-pi-hole/issues/1137
# If user goes on to bind monunt this directory to their host, then we can easily ensure macvendor.db is the latest
# (it is otherwise only updated when FTL is updated, which doesn't happen as part of the normal course of running this image)
mv /etc/pihole/macvendor.db /macvendor.db
ln -s /macvendor.db /etc/pihole/macvendor.db
if [ ! -f /.piholeFirstBoot ]; then
touch /.piholeFirstBoot
fi
echo 'Docker install successful'

53
src/s6/service Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/bash
# This script patches all service commands into the appropriate s6- commands
# pi-hole upstream scripts need a 'service' interface. why not systemd? docker said so.
start() {
restart
}
stop() {
/command/s6-svc -wD -d -T2500 /run/service/"$service"
}
restart() {
local pid
# Get the PID(s) of the service we are asking to restart
mapfile -t pids < <(pgrep "$service")
# Only attempt to stop the service if it is already running
if [ "${#pids[@]}" -gt 0 ]; then
stop
for pid in "${pids[@]}"; do
# Loop until we are certain that the process has been stopped
while test -d /proc/"$pid"; do
sleep 0.2
done
done
fi
# Check it hasn't been started by something else in the meantime
pid=$(pgrep "$service")
# Only attempt to start the service if it is not already running
if [ -z "$pid" ]; then
/command/s6-svc -wu -u -T2500 /run/service/"$service"
fi
}
status() {
/command/s6-svstat /run/service/"$service"
}
service="$1"
command="$2"
if [[ ! -d "/run/service/$service" ]] ; then
echo "s6 service not found for $service, exiting..."
exit
fi;
${command} "${service}"

View File

@@ -1,37 +0,0 @@
#!/bin/bash -e
# Dockerfile variables
export TAG
export ServerIP
export ServerIPv6
export PYTEST
export PHP_ENV_CONFIG
export PHP_ERROR_LOG
export HOSTNAME
export WEBLOGDIR
export DNS1
export DNS2
export INTERFACE
export IPv6
export WEBPASSWORD
export WEB_PORT
. /bash_functions.sh
echo " ::: Starting docker specific setup for docker diginc/pi-hole"
validate_env || exit 1
prepare_setup_vars
change_setting "IPV4_ADDRESS" "$ServerIP"
change_setting "IPV6_ADDRESS" "$ServerIPv6"
setup_web_port "$WEB_PORT"
setup_web_password "$WEBPASSWORD"
setup_dnsmasq "$DNS1" "$DNS2"
setup_php_env
setup_dnsmasq_hostnames "$ServerIP" "$ServerIPv6" "$HOSTNAME"
setup_ipv4_ipv6
setup_lighttpd_bind "$ServerIP" "$TAG"
test_configs
test_framework_stubbing
[ -f /.piholeFirstBoot ] && rm /.piholeFirstBoot
echo "::: Docker start setup complete"

26
test/Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM python:3.10-slim-bullseye
# Only works for docker CLIENT (bind mounted socket)
COPY --from=docker:20.10.17 /usr/local/bin/docker /usr/local/bin/
ARG packages
RUN apt-get update && \
apt-get install -y python3-dev curl gcc make \
libffi-dev libssl-dev ${packages} \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --no-cache-dir -U pip pipenv
RUN curl -L https://github.com/docker/compose/releases/download/2.10.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
COPY ./cmd.sh /usr/local/bin/
COPY Pipfile* /root/
WORKDIR /root
RUN pipenv install --system \
&& sed -i 's|/bin/sh|/bin/bash|g' /usr/local/lib/python3.10/site-packages/testinfra/backend/docker.py
RUN echo "set -ex && cmd.sh && \$@" > /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT entrypoint.sh
CMD cmd.sh

Some files were not shown because too many files have changed in this diff Show More