Skip to content

Instantly share code, notes, and snippets.

@max-peter
Created May 18, 2019 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save max-peter/f060ab0e6aa93eb5681cc647a8b29f40 to your computer and use it in GitHub Desktop.
Save max-peter/f060ab0e6aa93eb5681cc647a8b29f40 to your computer and use it in GitHub Desktop.
# Note: 192.168.123.xxx is an example network, you must update all these to match your own.
version: '2'
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: pihole
domainname: example.com # <-- Update
mac_address: d0:ca:ab:cd:ef:01
cap_add:
- NET_ADMIN
networks:
pihole_network:
ipv4_address: 192.168.123.199 # <-- Update
dns:
- 127.0.0.1
- 8.8.8.8
ports:
- 443/tcp
- 53/tcp
- 53/udp
- 67/udp
- 80/tcp
environment:
ServerIP: 192.168.123.199 # <-- Update (match ipv4_address)
VIRTUAL_HOST: pihole.example.com # <-- Update (match hostname + domainname)
WEBPASSWORD: "" # <-- Add password (if required)
restart: unless-stopped
networks:
pihole_network:
driver: macvlan
driver_opts:
parent: ovs_eth0
ipam:
config:
- subnet: 192.168.123.0/24 # <-- Update
gateway: 192.168.123.1 # <-- Update
ip_range: 192.168.123.192/28 # <-- Update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment