2022-02-03 16:33:22 +01:00
|
|
|
# pull official base image
|
|
|
|
FROM python:3.9.6-alpine
|
|
|
|
|
|
|
|
# set work directory
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# set environment variables
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
COPY ./requirements.txt .
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
2022-02-11 18:14:20 +01:00
|
|
|
# add user
|
|
|
|
RUN adduser --disabled-password --gecos '' service
|
|
|
|
USER service
|
|
|
|
|
2022-02-03 16:33:22 +01:00
|
|
|
# copy project
|
2022-02-04 18:16:58 +01:00
|
|
|
COPY . .
|
2022-02-11 18:14:20 +01:00
|
|
|
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
|