22 lines
458 B
Docker
22 lines
458 B
Docker
FROM python:3.11-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential gcc libffi-dev libpq-dev \
|
|
&& pip install --upgrade pip \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN pip install --prefix=/install --no-cache-dir -r requirements.txt
|
|
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /install /usr/local
|
|
COPY . .
|
|
|
|
CMD ["python", "main.py"]
|