I just set up the pihole myself on omv. Checked the tutorial, but did not like it due to the way he sets it up and for changing the dns in OMV.
Here is what I did:
First: create a macvlan on the hpst: 192.168.109.0/24 is my network, ens192 is the ethernet pot on my omv, gateway is 192.168.109.1 and I only want docker to use IPs 192.168.109.89 to 192.168.109.94 for internal network reasons.
Code
docker network create -d macvlan -o parent=ens192 --subnet 192.168.109.0/24 --gateway 192.168.109.1 --ip-range 192.168.109.89/29 macvlan0
This is the docker-compose.yml
Code
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
mac_address: de:ad:be:ef:ff:01 # can change or leave this
hostname: pihole
networks:
macvlan0: # same as network specified below
ipv4_address: 192.168.109.90 # the IP of the pihole container, ADJUST HERE
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "80:80/tcp"
- "443:443/tcp"
environment:
TZ: 'Europe/Berlin'
WEBPASSWORD: pihole
ServerIP: 192.168.109.90 # must match ipv4_address above ADJUST HERE
VIRTUAL_HOST: pihole.xxx.xxx.xyz # Must be hostname + domainname from above AHJUST HERE
# Volumes store your data between container upgrades
volumes:
- './etc-pihole/:/etc/pihole/' # I have the data inside the same folder as docker-compose.yml ADJUST HERE
- './etc-dnsmasq.d/:/etc/dnsmasq.d/' # I have the data inside the same folder as docker-compose.yml ADJUST HERE
dns:
- 127.0.0.1
- 1.1.1.1
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
restart: unless-stopped
networks:
macvlan0: # macvlan network created above
external: true
Alles anzeigen
If you use portainer, just kopy the docker-compose.yml file inside a portainer stack, make the adjustments and here you go.