dockerraspberry-piuv4l

Running uv4l inside Docker Container - not registering device node


I'm trying to run uv4l inside a Docker container. This is a short description of the u4vl project:

cross-platform, user space drivers for real or virtual video input and output devices (with absolutely no external difference from kernel drivers), and other pluggable back-ends or front-ends.

So inside the docker container, u4vl will try to register a user space driver. In my case exposing the Raspberry Pi camera as /dev/video0.

When I run the command:

uv4l --auto-video_nr --driver raspicam --width 1080 --height 720 --encoding mjpeg --server-option '--port=9000'

I get a message saying <notice> [core] Registering device node /dev/video0, but when I try to do ls /dev there is no /dev/video0 device.

I run the container in privileged mode using the --privileged flag in the docker run command.

Is there anything else I need to do inside the container in order to "allow" it to create a user space driver and new device?

I'm by no means a Linux expert, so forgive me if my terminology/understanding is a bit off.


Solution

  • I'm just working on it and I get it working with a Richo Thesa by running

    docker run -it --device=/dev/bus/usb/`lsusb | grep Ricoh|awk {'print $2'}`/`lsusb | grep Ricoh|awk {'print $4'}|sed 's/:$//'` -p 8080:8080 --cap-add=ALL --privileged -v /lib/modules:/lib/modules -v=/dev:/dev -e UV4L_PARAMETERS="-k -f --sched-rr --mem-lock --driver uvc --device-id 05ca:2711 --auto-video_nr" daniego/rover-uv4l
    

    Probably you need just to map the device. I will work on the raspicam next month, but you can probably find a way to get it working by having a look on my work https://github.com/daniego/rover-uv4l and https://hub.docker.com/r/daniego/rover-uv4l/