Docker Community Forums

Share and learn in the Docker community.

Switch --net=host not forwarding port

(Covenantuk) #1


I’m trying to run HomeAssistant within Docker on Windows 2016 Server

I can run fine using the following command:

docker run -d --restart always --name=“home-assistant” -p 8123:8123 -v V:/Docker/HomeAssistant:/config homeassistant/home-assistant

With the above, the application web admin page is available on port 8123 from the host network

However, discovery for Sonos/uPNP won’t work here as it’s not on the same network as the devices

Advice is to ruin --net=host (I’m fine with the security implications of that on my home network):

docker run -d --restart always --name=“home-assistant” --net=host -v V:/Docker/HomeAssistant:/config homeassistant/home-assistant

However, when I run like this the web page is unavailable. I tried telnet to that port and it isn’t open. Is there something I’m missing here?

Many thanks

(Covenantuk) #2

Ok - my search skills have improved slightly - it seems that a while ago --net=host doesn’t work on Docker for Windows. Does anyone know if this is still the case?