Hi,
I’m in the process of setting up Home Assistant on a NUC in docker. I’m quite new to docker so forgive me is the question is silly!
I habe Docker and docker-compose up and and running, and am running pihole and portainer successfully.
Now installing homeassistant in a container using a docker-compose.yml
file for configuration:
version: '3'
services:
homeassistant:
container_name: homeassistant
image: homeassistant/home-assistant:stable
volumes:
- ./config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
network_mode: host
The container start and runs without errors, but HA is not accessible on port 8123…
The only way to have is working is to comment out network_mode
and use a ports:
statement instead:
version: '3'
services:
homeassistant:
container_name: homeassistant
image: homeassistant/home-assistant:stable
ports:
- "8123:8123/tcp"
volumes:
- ./config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
# network_mode: host
I understand the network_mode: host
method is the recommended one ? At least this is what I take from here.
So my question would be, why is it not working and should I really care?
JF