Docker容器看不到串行端口设备 [英] Docker container can't see a serial port device
本文介绍了Docker容器看不到串行端口设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行可访问主机上串行端口的Docker容器.
I'm trying to run a Docker container with access to a serial port on the host.
这是我所做的:
- 我用过Mac
- 主机上已安装的驱动程序 ( http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41 )
- 插入设备 返回的
- 冉
ls /dev/t*
/dev/tty.usbserial
-如此奏效 - 先运行容器
docker run -it --privileged -v /dev:/dev node:4.4.0 /bin/bash
,然后在未返回/dev/tty.usbserial
设备的容器内运行ls /dev/t*
...
- I used a Mac
- Installed drivers on the host (http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41)
- Plugged in the device
- Ran
ls /dev/t*
that returned/dev/tty.usbserial
- so it worked - Ran the container,
docker run -it --privileged -v /dev:/dev node:4.4.0 /bin/bash
, and thenls /dev/t*
inside the container which didn't return the/dev/tty.usbserial
device...
我玩了很多不同的参数,但是我没有找到有效的参数:)
I played a lot with different variations of parameters, but I haven't found the working one :)
--device
标志也不适合我,因为可能会重新连接设备,并且名称可能与/dev/tty.usbserial
不同.
Also the --device
flag is not suitable for me since the device might be reconnected and the name could differ from /dev/tty.usbserial
.
推荐答案
查看全文