Thanks for your replies, seems this is a use case that is also interesting to some others who want to connect docker applications with the “real world”
I’ve not had a chance to look over current progress in the last days, but am picking it up again right now. @rneugeba, according to my results, it seems that docker for windows does not use hyper-v but something called Windows Server Silos for windows containers (is that correct?), therefore there might still be a chance, for Windows host to windows container passing through, less so for linux containers, I agree.
As to my current research, there are two ways that might seem possible to me, I’ll test them further in the upcoming days.
This approach here that I just stumbled over and am quite excited about:
Windows Container App Compat: Access host COM ports from a Windows Server container
He seems to describe a way to allow for direct device pass-through from Windows Hosts to Containers
A more indirect approach, in which a USB Device is interfaced at driver-level, data translated to IP packets and then emulated as a device on the target.
The open-source free packet usbip seems to allow for that, any USB device (probably low-speed) can be transmitted over network and then emulated on the target. Disadvantage: The Host must currently be a linux pc, so the USB device would for example need to be inserted in an external raspberry pi. In my first approaches, I got a raspberry host set up, however the emulation in a docker container does not seem quite straightforward. In theory, the container should be able to be a windows or a linux container.
A commercial project based upon usbip: VirtualHere
Seems to support Windows hosts, and is in comparison to the alternative above quite easy to use (GUI!). However, in order to use more than one device, you’d have to buy the software. With the free version, I was also not able to setup a device in the container in the end.
Both softwares cause a problem for me when emulating the device in the docker container. Although the software successfully connects to the host and sets up the device, I do not seem to be able to see/access it on the container. Maybe one of you would have more luck here…
@rneugeba, What would you say about an option to virtually pass usb devices via virtual network adapters, would you deem this feasible?