linux - Exposing a TTY device in a docker container with docker for mac -


i'm trying expose arduino that's plugged mac linux instance i'm running in docker mac (no vm).

the arduino exposes /dev/tty.usbserialxxx. i'm using node docker image 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 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 try 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 exposed!

i'm using expose serial devices test serial drivers in linux.

the problem here largely you're not running docker on mac. you're running linux vm on mac, inside you're running docker. means it's easy expose /dev tree inside linux vm docker, less easy expose devices mac, absent kind of support hypervisor.

using legacy "docker toolbox" mac, built around virtualbox, ought possible assign usb device virtualbox host running docker (which in turn allow expose docker containers).

this github issue talks particular situation , has links helpful documentation.

i don't know if sort of feature available hypervisor used in newer "docker mac" package.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -