Mount COM port from windows (WSL) host in Linux

Hello,

is it possible to mount a COM device (or multiple devices) from a Windows host in a Linux container?

I can mount the COM devices to a windows container with docker run --isolation=process --device="class/86E0D1E0-8089-11D0-9CE4-08003E301F73"

I can mount a single COM device from a Linux host to a Linux container with docker run --user root --device=/dev/ttyUSB0:/dev/ttyUSB0

But I can’t find any way to mount a COM device from a Windows host to a Linux container.

Linux containers can run only on Linux. Windows containers can run only on Windows. You can’t run Linux containers on Windows. It is not clear if you are using Docker Desktop or installed Docker CE in a WSL2 distribution. But either way, the question is if WSL2 supports mounting devices. I you want to mount USB devices, you can check Microsofts documentation

There is also a new feature in Docker Desktop v4.35

Thanks, yes I am using Windows with WSL.

I am actually talking about real “old school” COM serial ports. Those don’t show up with usbipd, I already tried that.

But the USB2IP solution could work, there are also tools for COM2IP that I could use. Thanks for the hint. I didn’t see that one before in my search.