ROS¹ on Raspberry PI with docker: Picamera and custom Dockerfile

PI Camera:

SUBSYSTEM==”vchiq”,MODE=”0666"
--env LD_LIBRARY_PATH=/opt/vc/lib

Make sure that your Dockerfile has below environment variable set before installing the picamera:

...
ENV READTHEDOCS=True
RUN pip3 install picamera
...

Run docker:

pi@raspberrypi:~ $ docker run --privileged --device /dev/vchiq -it --rm -v /opt/vc:/opt/vc --env LD_LIBRARY_PATH=/opt/vc/lib <<imageId>
root@f266081cf35b $ /opt/vc/bin/raspistill -o output.jpg
docker run --device /dev/i2c-0 --device /dev/i2c-1 <imageId>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store