Docker Community Forums

Share and learn in the Docker community.

Is it possible to send UDP broadcast inside docker container to scan devices IP connected to my Windows host network?

I have a python program which would send UDP broadcast to scan IP of any devices connected to my windows host. I tested it on my localhost without docker, and it works perfectly fine. But when I dockerized(Linux container) it , it cannot scan any of them.

I know the default network mode for docker is bridge, so any container we created would connect to a virtual ethernet, which is not the case I’m looking for. So I changed to host mode and trying to use the same host network environment to scan devices IP, but it seems it’s not supported on Windows Host.

I wonder if there’s any workaround for my use case? Thanks



OS: Windows 10 Professional 20H2 19042.1110
Docker Version: Docker Engine - Community V20.10.7 (WSL 2 backend)