Merge pull request #4 from BigDaddyAman/deps-update
Updated dependencies (boto3 → 1.40.33) Upgraded pip, setuptools, wheel in Docker build Refactored Dockerfile to multi-stage for smaller runtime image
This commit is contained in:
commit
00b29ea012
18
Dockerfile
18
Dockerfile
|
|
@ -1,14 +1,24 @@
|
|||
FROM python:3.12-slim AS builder
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y gcc libpq-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install --upgrade pip setuptools wheel
|
||||
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN pip install --prefix=/install -r /app/requirements.txt
|
||||
|
||||
FROM python:3.12-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y postgresql-client gcc libpq-dev gzip && \
|
||||
apt-get install -y postgresql-client gzip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /app/requirements.txt
|
||||
COPY --from=builder /install /usr/local
|
||||
|
||||
COPY main.py /app/main.py
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["python", "main.py"]
|
||||
CMD ["python", "main.py"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue