File size: 398 Bytes
d451798
 
aae4949
 
 
 
d451798
 
 
 
 
 
 
aae4949
d451798
 
 
aae4949
 
d451798
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Build stage
FROM python:3.8-alpine AS build

WORKDIR /app

COPY requirements.txt requirements.txt
RUN apk add --no-cache build-base && \
    pip3 install --user --no-cache-dir -r requirements.txt
    
COPY . .

# Production stage
FROM python:3.8-alpine AS production

WORKDIR /app

COPY --from=build /root/.local /root/.local
COPY . .

ENV PATH=/root/.local/bin:$PATH

CMD ["python3", "./run.py"]