How to map host's serial port to the container?

Hello, I am just trying to map my serial port to my docker container in Windows 10, and I am failing…

docker run … --device=/Device/Silabser0:/dev/…
docker: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device “/Device/Silabser0”: not a device node.

My device (/Device/Silabser0) is definitely visible, but for some reason docker claims it’s “not a device node”.

I am a maintainer / contributor for a home automation project called Misterhouse https://hub.docker.com/r/zonyl/misterhouse/ and am looking for the same information. Would really like to expand its adoption through a docker image, serial port access is crucial for this software, and any help would be greatly appreciated!!!

I have tried:
–device=COM3:/dev/ttyS2
–device=//./COM3:/dev/ttyS2
and it reports it cannot lstat the source

When doing this:
–device=/dev/ttyS2:/dev/ttyS2
it will run, however, accessing the /dev/ttyS2 device gets a gattr == Input/Output error


Im guessing this is the reason?