rdaems
Posts: 9
Joined: Tue May 21, 2013 9:00 am

Raspistill not working in docker container

Fri Jul 29, 2016 12:55 pm

Hello,

I'm trying to get the a simple docker image (which support raspistill) running on the raspbian jessie lite OS.
I enabled camera support via raspi-config and is working.

The problem is that I get the error : "* failed to open vchiq instance"
when I run raspistill in the docker container.

My dockerfile is as following:
FROM resin/rpi-raspbian:jessie
RUN apt-get -q update && apt-get -y install libraspberrypi-bin && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN usermod -a -G video root
CMD modprobe bcm2835-v4l2
CMD ["/bin/bash"]

Does anyone have an idea how to get the camera working in the container

Br, Rob

ber0tech
Posts: 9
Joined: Sun Feb 10, 2013 9:41 pm

Re: Raspistill not working in docker container

Mon Aug 01, 2016 6:58 pm

The camera module needs access to additional devices that are not available by default.
Try the following:

Code: Select all

docker run --device=/dev/vcsm --device=/dev/vchiq ...
or to allow everything (not recommended)

Code: Select all

docker run --privileged ...
See https://docs.docker.com/engine/referenc ... pabilities for details.
regards
peter

rdaems
Posts: 9
Joined: Tue May 21, 2013 9:00 am

Re: Raspistill not working in docker container

Tue Aug 02, 2016 6:05 am

Indeed, adding

Code: Select all

--device=/dev/vchiq
solved the problem.

Thanks.

Br, Rob

Return to “Raspbian”