在Docker容器中访问摄像头 [英] Access camera inside docker container

查看:81
本文介绍了在Docker容器中访问摄像头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这是否可能,但是有没有办法在docker容器中访问我的相机?我没有使用外接摄像头,而是内置在Mac中.

I'm not sure that this is even possible, but is there a way to access my camera inside docker container? I'm not using external camera but built-in in my mac.

推荐答案

我不确定标记卷( -v )是否是这样做的最佳实践.

I'm not sure that the flag volume (-v) is the best practice to do so.

根据jfrazelle的github,为chrome,skype,spotify等许多图形应用程序编写了许多Dockerfile和 docker run 的docker工程师,应使用的标志和参数为-设备/dev/video0 .

According to the github of jfrazelle, docker engineer who wrote many Dockerfile and docker run for many graphical app such as chromium, skype, spotify, and so on, the flag and argument you should use is --device /dev/video0.

这篇关于在Docker容器中访问摄像头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆