feat: Adds macvlan network.

This commit is contained in:
2025-03-25 10:49:19 -04:00
parent 9467e220e6
commit 2617ef6441

View File

@@ -7,14 +7,19 @@ services:
- "53:53/tcp"
- "53:53/udp"
- "8088:80/tcp"
network_mode: host
networks:
pihole_network:
ipv4_address: 192.168.1.198
priority: 1000
pihole_bridge:
ipv4_address: 192.168.100.2
priority: 900
env_file:
- .env
security_opt:
- no-new-privileges:true
cap_add:
- NET_ADMIN
- CAP_SYS_TIME
- SYS_TIME
- SYS_NICE
volumes:
- pihole_data:/etc/pihole
- pihole_dnsmasq:/etc/dnsmasq.d
@@ -24,12 +29,34 @@ services:
container_name: unbound
restart: unless-stopped
ports:
- "5053:53/tcp"
- "5053:53/udp"
network_mode: host
- "53:53/tcp"
- "53:53/udp"
networks:
pihole_network:
ipv4_address: 192.168.1.199
volumes:
- unbound_data:/opt/unbound/etc/unbound
networks:
pihole_bridge:
driver: bridge
ipam:
config:
- subnet: 192.168.100.0/24
gateway: 192.168.100.1
ip_range: 192.168.100.2/32
pihole_network:
name: pihole_network
driver: macvlan
driver_opts:
parent: end0
ipam:
config:
- subnet: 192.168.1.0/24
ip_range: 192.168.1.0/24
gateway: 192.168.1.1
volumes:
pihole_data:
driver: local