I'm trying to expose an Arduino that's plugged into my mac to a linux instance I'm running in Docker for Mac (no vm).
The Arduino exposes itself as /dev/tty.usbserialXXX
. I'm using the node
docker image which is based upon ubuntu.
The command I'm running is
$ docker run --rm -it -v `pwd`:/app --device /dev/tty.usbmodem1421 node bash
docker: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/tty.usbmodem1421": lstat /dev/tty.usbmodem1421: no such file or directory.
If I try to use --privileged
$ docker run --rm -it -v `pwd`:/app --device /dev/tty.usbmodem1421 --privileged node bash
root@8f18fdbcf64d:/# ls /dev/tty.*
ls: cannot access /dev/tty.*: No such file or directory
Nothing is exposed!
I'm using this to expose serial devices to test serial drivers in linux.