-
-
Save chrisjung-dev/a8da71f7f6500bb49547add2cd130cb1 to your computer and use it in GitHub Desktop.
Pi-Hole Docker with dedicated IP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PUID= | |
| PGID= | |
| NETWORK_INTERFACE= | |
| IP_ADDRESS= | |
| SUBNET= | |
| GATEWAY= | |
| TZ= | |
| WEBPASSWORD= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| pihole: | |
| image: pihole/pihole:latest | |
| container_name: pihole | |
| environment: | |
| TZ: '${TZ}' | |
| FTLCONF_webserver_api_password: '${WEBPASSWORD}' | |
| volumes: | |
| - './data/etc-pihole/:/etc/pihole/' | |
| - './data/etc-dnsmasq.d/:/etc/dnsmasq.d/' | |
| ports: | |
| - '53:53/tcp' | |
| - '53:53/udp' | |
| - '80:80' | |
| - '443:443' | |
| restart: unless-stopped | |
| dns: | |
| - 127.0.0.1 | |
| - "${GATEWAY}" | |
| - 1.1.1.1 | |
| - 8.8.8.8 | |
| user: "${PUID}:${PGID}" | |
| networks: | |
| pihole_net: | |
| ipv4_address: "${IP_ADDRESS}" # <-- Dedicated IP | |
| networks: | |
| pihole_net: | |
| driver: macvlan | |
| driver_opts: | |
| parent: "${NETWORK_INTERFACE}" # <-- Change to your network interface | |
| ipam: | |
| config: | |
| - subnet: "${SUBNET}" # <-- Change to your subnet | |
| gateway: "${GATEWAY}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment