From 7da3cb0377b1ac7c46fee95796410f39ee20defe Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 1 Feb 2023 07:53:35 -0500 Subject: [PATCH] avoid poetry installing deps when we have them cached if they do not change --- spiffworkflow-backend/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spiffworkflow-backend/Dockerfile b/spiffworkflow-backend/Dockerfile index f4a8f8ec1..d7a4b0345 100644 --- a/spiffworkflow-backend/Dockerfile +++ b/spiffworkflow-backend/Dockerfile @@ -24,6 +24,11 @@ RUN useradd _gunicorn --no-create-home --user-group RUN apt-get update \ && apt-get install -y -q gcc libssl-dev libpq-dev +# poetry install takes a long time and can be cached if dependencies don't change, +# so that's why we tolerate running it twice. +COPY pyproject.toml poetry.lock /app/ +RUN poetry install --without dev + COPY . /app RUN poetry install --without dev