File size: 496 Bytes
e7db0a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.9-slim


RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app

COPY --chown=user . $HOME/app
COPY ./requirements.txt ~/app/requirements.txt

USER root
RUN rm /var/lib/apt/lists/* -vf
RUN apt-get clean
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y wget zip unzip uvicorn espeak-ng
USER user
COPY . .
USER root
RUN chmod 777 ~/app/*
USER user

RUN pip3 install -r requirements.txt

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