FROM alpine ENV TZ=Asia/Shanghai ADD . /root RUN apk add tzdata python3 py3-smbus jpeg-dev zlib-dev libjpeg freetype-dev && \ apk add --virtual build-deps build-base linux-headers py3-pip python3-dev && \ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pillow && \ cd /root && \ sed -i "s/3.x/$(python3 -V | grep -oE '\d+\.\d+')/g" main.c && \ make && \ rm daemonize.c daemonize.h main.c Makefile Dockerfile && \ apk del build-deps WORKDIR /root ENTRYPOINT ["/root/docker-entrypoint.sh"]