1

I want to create a fake webcam in a docker container, so I install v4l2loopback-dkms on a docker container with the "adoptopenjdk/openjdk11:ubuntu-jre" image. When I run: sudo modprobe v4l2loopback devices=1

I get this error: mobprobe: FATAL: Module v4l2loopback not found in directory /lib/modules/5.15.49-linuxkit

I tried making v4l2loopback from the github repository using make, but I still get the same error.

YaronD
  • 11
  • 3
  • For a couple of reasons, you can't install kernel modules from inside a container. Containers also don't have any notion of hardware, though. Would it make more sense to run this task in a full virtual machine, with a dedicated kernel and simulated hardware? – David Maze Nov 27 '22 at 10:56
  • [Here](https://unix.stackexchange.com/questions/702856/use-v4l2loopback-in-docker-dev-video0-missing-in-docker) someone got it to work, not saying what is the image, however. Hopefully that helps with what has to be installed – ignacio Nov 27 '22 at 10:56

0 Answers0