是否可以在Windows下使用Docker映像访问硬件设备? [英] Is it possible to access a hardware device with a Docker image under Windows?
问题描述
最近,发布了适用于Windows的本地Docker客户端(> = Windows 7) 。
Recently, a native Docker client for Windows was released (>= Windows 7).
我想知道:是否可以转发对作为主机运行Windows的物理设备的访问权限?
使用* nix主机,使用以下语法似乎可行:
With a *nix host, this seems to be possible with the following syntax:
docker run -t -i --device=/dev/ttyUSB0 ubuntu bash
(建议为此处),它将在* nix系统上将USB设备 / dev / ttyUSB0
转发到
(as proposed here) which would forward the USB device /dev/ttyUSB0
on a *nix system to the docker image.
-device
标志的描述可在 docker文档。
Windows主机的语法是什么?
推荐答案
使用Windows Docker的Docker容器当前无法使用Windows USB设备。
Windows USB devices are not currently available to Docker containers run with Docker for Windows.
Docker员工于2017年7月7日在Docker论坛上进行了回答。
Answered by a Docker staff member on the 7th of July 2017 in the Docker forum.
如果他们会以某种方式允许此功能,则此答案可能会在一段时间后过时。
这篇关于是否可以在Windows下使用Docker映像访问硬件设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!