small/Dockerfile
2024-10-11 21:05:04 +03:00

19 lines
312 B
Docker

FROM alpine:3.20
ENV APP_ENV=/opt/venv
ENV PATH="${APP_ENV}/bin:$PATH"
WORKDIR $APP_ENV
COPY . .
RUN apk add --no-cache py3-pip uwsgi-python3 && \
python3 -m venv $APP_ENV && \
pip install --no-cache-dir . && \
adduser -D -H small
EXPOSE 8002
USER small:small
ENTRYPOINT ["/opt/venv/entrypoint.sh"]