Skip to content

Notes on running inside Docker

mhupfauer edited this page May 13, 2021 · 3 revisions

Docker containers can not access the GPIO interfaces nor the I2C bus of their host system. Therefore the docker container has to be run with two special commands.

I2C

--device /dev/i2c-1

GPIO

--device /dev/gpiomem

Startup command

docker run -p 80:5000 --device /dev/i2c-1 --device /dev/gpiomem -v picure:latest

This will also expose the web service running at port 5000 inside the container on the host system's port 80 (default http port).

Clone this wiki locally