Skip to content

Instantly share code, notes, and snippets.

@souri-t
Created May 22, 2018 16:32
Show Gist options
  • Save souri-t/612b6376eb9ba250ba8c7b3c2a23ff8e to your computer and use it in GitHub Desktop.
Save souri-t/612b6376eb9ba250ba8c7b3c2a23ff8e to your computer and use it in GitHub Desktop.
WiringPi on alpine image by Docker
FROM armhf/alpine:latest
MAINTAINER souri-t <souri-t@github.com>
# Install dependencies
RUN apk update
RUN apk add python3 python3-dev musl-dev gcc
RUN pip3 install --upgrade pip
RUN pip3 install rpi.gpio
RUN apk add wiringpi
# Define working directory
WORKDIR /data
VOLUME /data
CMD ["/bin/sh"]
@souri-t
Copy link
Author

souri-t commented May 22, 2018

docker run --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/gpio:/dev/gpio --privileged -ti [image_name] /bin/sh

@souri-t
Copy link
Author

souri-t commented May 22, 2018

The image has been run on Linux Kernel 4.4.47.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment