File size: 468 Bytes
2da028e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.11-slim

RUN useradd -m -u 1000 user && \
    mkdir /home/user/app && \
    chown -R user:user /home/user/app

WORKDIR /home/user/app

RUN apt-get update && \
    apt-get install -y && \
    rm -rf /var/lib/apt/lists/*

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

USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

COPY --chown=user:user . .

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