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?
I know it’s 2022 but yes that is still true. --net=host won’t work on Win Desktop. I use -p 8123:8123 but not all Integrations work with HA as HA doesn’t see all the devices on my network.
As Docker ins running in a WSL distribution, there is no way --net=host will ever work. It will never be possible to hook into the host’s network interface, as it relies on Linux kernel feature called namespaces, which simply does not exist on the Windows host. Though, it should be possible to run --net=host from inside a WSL distribution. If you had something like an udp broadcast relay solution on your Windows host to relay the Sonos discovery udp messages to the WSL distribution, it might work if the container is started inside the WS distribution using --net=host. Note: I have no idea if a udp broadcast relay exists for Windows.
It is possible to relay udp broadcast requests from one network to another. At home, I am using clients in a DMZ that need to send udp broadcast messages to a server to register themselves, but the server runs in a different network and as such would never receive the udp broadcast messages, if i wouldn’t use a udp broadcast releay to forward the udp broadcast messages from one network to the other.