From 0c51954ddb5a79ae96d9e47b87a509ebb46cd4b8 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 11 Feb 2024 12:59:28 +0100 Subject: [PATCH] optimize docker build time --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9e2065..99e7834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,10 +30,6 @@ RUN apt-get update -y \ libxml2 \ media-types -# Fetch project requirements -############################################## -COPY --chown=django:django --from=git /git-describe /git-commit /build-date /app/git/ - # Create directory structure ############################################## WORKDIR /app @@ -53,6 +49,10 @@ RUN python -m pip install --no-cache-dir -r requirements.txt WORKDIR /app/src RUN python manage.py collectstatic --noinput --clear +# Copy git info +############################################## +COPY --chown=django:django --from=git /git-describe /git-commit /build-date /app/git/ + EXPOSE 8000 WORKDIR /app/src