Dockerfile 341 B

123456789
  1. FROM python:3.9.4-alpine3.12
  2. COPY requirements.txt dht22mqtt.py gpiomapping.py ./
  3. RUN apk add gcc musl-dev && \
  4. pip3 install -r requirements.txt --no-cache-dir && \
  5. pip3 cache purge && \
  6. apk del gcc musl-dev && \
  7. rm -rf /var/lib/apk/lists/* && \
  8. mkdir log && chmod 777 log/
  9. CMD [ "python3", "-u", "dht22mqtt.py" ]