mirror of
https://github.com/wahyd4/raspberry-pi.git
synced 2026-08-08 20:36:36 +10:00
19 lines
570 B
Docker
19 lines
570 B
Docker
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 <linux/spi/spidev.h>"
|
|
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
|