Dockerfile update

This commit is contained in:
machka
2025-05-21 11:04:05 +00:00
parent 0fe29c19b1
commit 4732a97611
+14 -4
View File
@@ -1,11 +1,21 @@
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 requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --from=builder /install /usr/local
COPY . .
CMD ["python", "main.py"]