File size: 584 Bytes
744c9a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Build stage    
FROM python:3.10-slim-buster AS build    
    
WORKDIR /app    
    
COPY requirements.txt requirements.txt    
RUN apt-get update && \  
    apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev && \  
    pip3 install --user --no-cache-dir -r requirements.txt    
    
COPY . .    
    
# Production stage    
FROM python:3.10-slim-buster AS production    
    
WORKDIR /app    
    
COPY --from=build /root/.local /root/.local    
COPY . .    
    
ENV PATH=/root/.local/bin:$PATH    
    
CMD ["python3", "./run.py"]