I am running home assistant inside a docker container for some month. Lately I started isolating my various containers in order to only expose the necessary ports to the outside world.
My home assistant container still runs with the network_mode:host setting, since auto-discovery and bluetooth require the host networking system. Is there a way to avoid using the complete host networking stack and instead only expose or mount the necessary ports to the container?
Or does home assistant always require the host networking stack to work properly?
Currently I am using the following docker-compose file:
version: '3'
services:
homeassistant:
image: homeassistant/raspberrypi3-homeassistant:latest
container_name: homeassistant
restart: always
network_mode: host
volumes:
- /opt/home_assistant/:/config
- /etc/localtime:/etc/localtime:ro
- /media/usbstick/container/ssl:/ssl