I'm currently working on a human detection project using ESP32-S3 boards with the ruvnet/wifi-densepose Docker image. My setup includes two ESP32-S3-WROOM-1 boards and I'm running Docker Desktop on Windows 11, with WSL2 installed. The RX board sends CSI data via UDP to my laptop at 192.168.137.1:5005. However, I'm having trouble with UDP packets not reaching the Docker container. Despite confirming that the port mapping is correct, the Docker logs show no reception of the CSI frames. I've tried various solutions, including using a portproxy, running a Python bridge script, and sending directly to the container's IP, but nothing seems to work. The strange part is, this setup worked once before, even with incorrect port mapping! Is there a known issue with UDP port forwarding in Docker Desktop on Windows with WSL2 enabled? Any suggestions would be greatly appreciated!
2 Answers
Sometimes Docker networking can be tricky on Windows. Have you checked your firewall settings? Adding the firewall rule was a good step, but ensure that the correct port is allowed for inbound and outbound traffic. It may also help to run Docker in administrator mode, as it sometimes resolves network issues.
It sounds like a tricky situation! One thing to try is simplifying the setup. Before diving back into the Docker complexities, try using netcat or Wireshark to send and receive UDP traffic without the ESP32 or Docker involved. This can help isolate the issue and confirm whether UDP packets are actually being sent and received.
I did similar troubleshooting and found that using Wireshark revealed that Docker Desktop on Windows might be blocking loopback UDP traffic. It could save you some time to test everything outside of Docker first.

Thanks for the suggestion! I'll check the firewall settings again and see if running Docker as admin helps.