FROM python:3-alpine ARG USER_=admin ARG UID_=1000 RUN apk add --no-cache --upgrade bash ADD --chown=$UID_:$UID_ . /www WORKDIR /www RUN chmod +x start.sh RUN set -e; \ apk add --no-cache --virtual .build-deps \ gcc \ libc-dev \ linux-headers \ ; \ pip install -r requirements.txt; \ apk del .build-deps; RUN adduser -S -D $USER_ -u $UID_ USER $USER_ ENTRYPOINT ["./start.sh"]