I'm having weird trouble. When i run 'network_mode: host' i cant get to the admin webUI. If instead, i run -p 80:80 & 443:443 in my compoe, i get there just fine, everything works. I'd just to use DHCP so i want to run in network host mode.
Expected Behaviour:
expected to log into admin webUI in network mode host.
Actual Behaviour:
nothing. it seems the webservice isnt running?
$ nmap -Pn 192.168.1.3 -p 443,80
Starting Nmap 7.93 ( https://nmap.org ) at 2024-12-18 17:12 CST
Nmap scan report for 192.168.1.3
Host is up (0.0094s latency).
PORT STATE SERVICE
80/tcp closed http
443/tcp closed https
Debug Token:
https://tricorder.pi-hole.net/45GFQBup/
##Compose
version: "3.4" # More info at https://github.com/pi-hole/docker-pi-hole/tree/development
services:
pihole:
container_name: pihole
image: pihole/pihole:development
network_mode: host
# ports:
# - "53:53/tcp" # DNS Port TCP
# - "53:53/udp" # DNS Port UDP
# - "80:80/tcp" # Default HTTP Port
# - "443:443/tcp" # Default HTTPs Port. FTL will generate a self-signed certificate
# - "67:67/udp" # Uncomment this line if using Pi-hole as your DHCP Server
environment:
PUID: 1000
GUID: 1000
TZ: 'America/Chicago' # Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
FTLCONF_webserver_api_password: 'sdklfndsklfns' # Set a password to access the web interface. Not setting one will result in a random password being assigned
volumes: # Volumes store your data between container upgrades
- '/mnt/docker_configs_local/pihole:/etc/pihole' # For persisting Pi-hole's databases and common configuration file
#- './etc-dnsmasq.d:/etc/dnsmasq.d' # Uncomment this line if you have custom dnsmasq config files that you want to persist. Not needed for most.
cap_add: # See https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
- SYS_TIME
- SYS_NICE
restart: unless-stopped
deploy:
placement:
constraints:
- node.hostname == rpi5a