File size: 374 Bytes
0450dba
 
87be28d
 
 
 
0450dba
87be28d
0450dba
87be28d
 
0450dba
87be28d
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.9

RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
ENV PYTHONUNBUFFERED=1

WORKDIR /code

COPY --chown=user ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY --chown=user . /code/

USER root
RUN chmod +x /code/start.sh
USER user

CMD ["/bin/bash", "/code/start.sh"]