Docker Community Forums

Share and learn in the Docker community.

ERROR: for hass "host" network_mode is incompatible with port_bindings

Any idea how to correct this error? ty

ERROR: for hass “host” network_mode is incompatible with port_bindings

Docker Compose 1.28
Docker 20.10.2

version: ‘3.3’
Services:

hass:
container_name: hass
image: homeassistant/raspberrypi4-homeassistant:dev
restart: always
volumes:
- /home/pi/hass_config:/config
environment:
- TZ=America/Thunder_Bay
devices:
- /dev/hidraw0
network_mode: host
ports:
- 8123:8123
user: “{LOCAL_USER}:{LOCAL_USER}”

Hi

When you define network_mode: host, you no longer can map ports in the container, since the container will act like its an application running on your server.

All ports exposed by the container, will be accessible by default.

so try and remove “network_mode: host” and start it up, you should see the ports listning via: netstat -tulpn

2 Likes