FROM python:3-alpine

RUN apk add build-base

RUN addgroup -S flask && addgroup -g 997 -S gpio  && adduser -S flask -G flask -G gpio

USER flask

WORKDIR /usr/src/flask_klaxon

COPY . .
RUN pip install --no-cache-dir -r requirements.txt

CMD ["python","klaxon_flask.py"]
