![]() ![]() DHCP and Docker's multiple network modes are covered in detail on our docs site: Docker DHCP and Network Modes Environment Variables 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. Set your TZ environment variable to make sure the midnight log rotation syncs up with your timezone's midnight. If PIHOLE_BASE is not set, files are stored in your current directory when you invoke the script.Īutomatic 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. You can customize where to store persistent data by setting the PIHOLE_BASE environment variable when invoking docker_run.sh (e.g. The IP lookup variables may not work for everyone, please review their values and hard code IP and IPv6 if necessary. ![]() Volumes are recommended for persisting data across container re-creations for updating images. If you're using a Red Hat based distribution with an SELinux Enforcing policy add :z to line with volumes like so: 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 This container uses 2 popular ports, port 53 and port 80, so may conflict with existing applications ports. ![]() Use the above quick start example, customize if desired.Install docker for your x86-64 system or ARMv7 system using those links.OverviewĪ Docker project to make a lightweight x86 and ARM container with Pi-hole functionality. (This can also be achieved by setting the environment variable DNSMASQ_LISTENING to all) 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.Run docker compose up -d to build and start pi-hole (Syntax may be docker-compose on older systems). ![]() NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed restart: unless-stopped './etc-dnsmasq.d:/etc/dnsmasq.d ' # cap_add: TZ: 'America/Chicago ' # WEBPASSWORD: 'set a secure password here or it will be random' # Volumes store your data between container upgrades volumes: "67:67/udp " # Only required if you are using Pi-hole as your DHCP server Version: "3 " # More info at and services:Ĭontainer_name: pihole image: pihole/pihole:latest # For DHCP it is recommended to remove these ports and instead add: network_mode: "host" ports: Copy to docker-compose.yml and update as needed.TL DR, don't use that mode, and be explicit with the permitted caps (if needed) instead Some users have reported issues with using the -privileged flag on 2022.04 and above. You can try this workaround at your own risk (Note, you may also find that you need the latest docker.io (more details here) If you absolutely cannot do this, some users have reported success in updating libseccomp2 via backports on debian, or similar via updates on Ubuntu. The first recommendation is to upgrade your host OS, which will include a more up to date (and fixed) version of libseccomp. Using Watchtower? See the Note on Watchtower at the bottom of this readmeĪs of 2023.01, if you have any modifications for lighttpd via an nf file, this file now needs to be mapped into /etc/lighttpd/conf-enabled/nf insteadĭue to a known issue with Docker and libseccomp <2.5, 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, and maybe CentOS 7). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |