From cf5cf4e18a936c1bbb6b950644d56fc70507871f Mon Sep 17 00:00:00 2001 From: Matthew Cengia Date: Sun, 19 Mar 2023 17:31:04 +1100 Subject: [PATCH] Dockerfile: Split out COPY of pyproject.toml This way, the `poetry install` gets cached properly and doesn't run every time. Signed-off-by: Matthew Cengia --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6bc56b4..1b4ab3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,9 @@ RUN poetry config virtualenvs.in-project true WORKDIR ${WORKDIR} -COPY --chown=1000:1000 . . +COPY --chown=1000:1000 pyproject.toml . RUN poetry install --only main +COPY --chown=1000:1000 . . # END Builder FROM python:3.11-alpine