From bff184c497d60a18c081ef621492947e5c9ef10a Mon Sep 17 00:00:00 2001 From: Philipp Grathwohl Date: Tue, 7 Dec 2021 21:09:50 +0100 Subject: [PATCH] Install RPi.GPIO in docker image --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index bc14714..884bf9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,11 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel COPY --chown=craftbeerpi ./requirements.txt /cbpi-src/ RUN pip3 install --no-cache-dir -r /cbpi-src/requirements.txt +# Install RPi.GPIO separately because it's excluded in setup.py for non-raspberrys. +# This can enable GPIO support for the image when used on a raspberry pi and the +# /dev/gpiomem device. +RUN pip3 install --no-cache-dir RPi.GPIO==0.7.1a4 + FROM base as deploy # Install craftbeerpi from source COPY --chown=craftbeerpi . /cbpi-src