Raspberry Pi compatible Docker base image with Python, C, serial support (pyserial) and GPIO support (wiringpi2, libwiringpi) preinstalled. Adapted from Hypriot's rpi-python.
rpi-python-serial-wiringpi at DockerHub
Run all the commands from within the project root directory.
From within the same directory as Dockerfile:
docker build -t <YOUR_IMAGE_HERE> .
Replace YOUR_IMAGE_HERE with image name (acencini/rpi-python-serial-wiringpi if getting from DockerHub) that you created.
docker run --device /dev/mem:/dev/mem --device /dev/ttyAMA0:/dev/ttyAMA0 --privileged -ti YOUR_IMAGE_HERE /bin/bash
MIT Licensed