FROM arm32v7/python:alpine WORKDIR /code # linux-headers fix the issue of "spidev_module.c:33:10: fatal error: linux/spi/spidev.h: No such file or directory #include " RUN apk update \ && apk add --update --no-cache alpine-sdk build-base linux-headers py-pip libusb-dev python-dev \ py3-setuptools zlib-dev RUN python -m pip install --upgrade pip setuptools \ && pip install RPi.GPIO pyusb smbus2 Adafruit-SSD1306 RUN pip install pillow --global-option="build_ext" --global-option="--disable-jpeg" ADD x.py /code CMD python x.py