title: How do I get webcam acess permissions in docker?
body: <p>I'm trying to acess webcam from docker image. My permissions:</p>
  
  <pre><code>dockerx@85ca088a4e0c:~$ ls -la /dev/vid*
    crwxrwxrwx+ 1 root 986 81, 0 May 29 08:52 /dev/video0
    crwxrwxrwx+ 1 root 986 81, 1 May 29 08:52 /dev/video1
  dockerx@85ca088a4e0c:~$ groups dockerx
    dockerx : dockerx root video x2gouser
  </code></pre>
  
  <p>So, in theory, i have permissions to acess /dev/video*, but attempt to acess it (via vlc, for example) causes error:</p>
  
  <pre><code>dockerx@85ca088a4e0c:~$ vlc
  VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
  [00005629e3774420] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
  QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-dockerx'
  [00005629e3778390] main playlist: playlist is empty
  [00007f5ca80010e0] v4l2 demux error: cannot open device '/dev/video0': Operation not permitted
  [00007f5ca80010e0] v4l2 demux error: cannot open device '/dev/video0': Operation not permitted
  [00007f5ca8003350] v4l2 stream error: cannot open device '/dev/video0': Operation not permitted
  [00007f5ca000c800] v4l2 demux error: cannot open device '/dev/video1': Operation not permitted
  [00007f5ca000c800] v4l2 demux error: cannot open device '/dev/video1': Operation not permitted
  [00007f5ca000d130] v4l2 stream error: cannot open device '/dev/video1': Operation not permitted
  QObject::~QObject: Timers cannot be stopped from another thread
  </code></pre>
  
  <p>Why can this happen? </p>
  
  <p>Upd.:
  <a href="https://pastebin.com/WGb9RsAZ" rel="nofollow noreferrer"> My Dockerfile</a>,
  <a href="https://pastebin.com/3MshjJHH" rel="nofollow noreferrer">entrypoint.sh</a></p>
  
  <p>UPD2. If you vote against, please spend one minute to say why. Thank you.</p>