Enable webcam in docker application and access thru AWS ECS

our requirement is , using docker we need to detect webcam from internet (amazon EC2)

using cv2 we are trying to detect the webcam from internet by leveraging on AWS ECS.

  • Docker or Docker for AWS and Deployment on AWS EC2
  • Update a Docker Image on an EC2 Instance
  • Running Docker container randomly disappears on AWS EC2 Ubuntu
  • Sporadic Robolectric test failures when running inside Docker container
  • Terraform unable to get docker to join swarm
  • Persistent mysql data from docker container
  • video_capture = cv2.VideoCapture(0)
    ret, frame = video_capture.read()
    

    we are not getting any error but no webcam is detected when we run it from AWS EC2.

    using the below command i executed the docker. still it is not working

    sudo docker run -d -p 5000:5000 --privileged -v /dev/video0:/dev/video0
    dockimage
    

    FYI:
    We have created docker images in ubuntu VM 16.04

    Thanks
    Avi

  • Persistence of Docker Data Containers
  • Database in docker containers - readonly images vs durability
  • Scripts in shell script not being executed in docker
  • How to upgrade docker container after its image changed
  • Testing a dockerized Ruby on Rails app with MySQL on CircleCI
  • Push image vs building on system itself, docker
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.