Skip to content

Commit

Permalink
multi-stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick committed Jun 18, 2024
1 parent 3212b28 commit 172db9a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 349 deletions.
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-alpine
FROM python:${PYTHON_VERSION}-alpine as builder

RUN apk add libxml2-dev libxslt-dev cargo

WORKDIR /app
COPY ./requirements.txt /tmp/
COPY ./app ./
COPY ./requirements.txt ./

RUN pip install --no-cache-dir -r requirements.txt

FROM python:${PYTHON_VERSION}-alpine

RUN pip install -r /tmp/requirements.txt
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages

WORKDIR /app
COPY ./app ./

ENV TZ=Europe/Amsterdam
ENV PYTHONUNBUFFERED=1

EXPOSE 5000

CMD ["python","./index.py"]
327 changes: 0 additions & 327 deletions poetry.lock

This file was deleted.

18 changes: 0 additions & 18 deletions pyproject.toml

This file was deleted.

0 comments on commit 172db9a

Please sign in to comment.