How can I access usb devices connected to my Mac from within a docker container (e.g. as /dev/ttyACM0)?
My setup:
- Removed official Docker Desktop
- Installed docker-machine per instructions at https://github.com/Parallels/docker-machine-parallels/
- Made USB device available in `pal-dev` virtual machine
- On Mac, ran `docker run --rm -it -v `pwd`:/app --privileged ubuntu bash`
- From the bash prompt (in the ubuntu container): `ls /dev` - my usb serial device is not present.
Output from `lsusb` shows the device (Embassy USB-serial logger):
Bus 001 Device 007: ID 045e:007e Microsoft Corp. Wireless Transceiver for Bluetooth
Bus 001 Device 009: ID 203a:fff9 PARALLELS FaceTime HD Camera (Built-in)
Bus 001 Device 008: ID 203a:fffc PARALLELS Virtual Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 019: ID c0de:cafe Embassy USB-serial logger
Bus 002 Device 018: ID 203a:fffe PARALLELS Virtual USB1.1 HUB
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
I've also tried an Ubuntu VM hosted by Parallels - it has access to the usb device.
Background: Lack of support for usb passthrough is a known limitation of Docker Desktop. I hope to use Parallels as an alternative that has this capability. Getting the device to show up in `/dev` is the stumbling block.
Thanks,
Bernhard