version: '3.7' services: fakecam: image: fakecam init: true build: context: ./ volumes: - ${IMAGE_BACKGROUND}:/src/background-custom:ro - ${IMAGE_FOREGROUND}:/src/foreground-custom:ro - ${IMAGE_FOREGROUND_MASK}:/src/foreground-mask-custom:ro devices: - ${VIDEO_INPUT}:/dev/video0 - ${VIDEO_OUTPUT}:/dev/video2 command: ["-b", "background-custom", "-f", "foreground-custom" , "-m", "foreground-mask-custom", "--webcam-path", "/dev/video0", "--v4l2loopback-path", "/dev/video2"]