From acf333493adc031d1ce561183c1f903b39b01119 Mon Sep 17 00:00:00 2001 From: Andoni Alonso <14891798+andoniaf@users.noreply.github.com> Date: Fri, 6 Jun 2025 10:42:14 +0200 Subject: [PATCH] chore(api): reorder docker layers to speed up build times (#7957) --- api/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 8291b14295..86cf59c8d3 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -37,18 +37,17 @@ COPY pyproject.toml ./ RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir poetry -COPY src/backend/ ./backend/ - ENV PATH="/home/prowler/.local/bin:$PATH" # Add `--no-root` to avoid installing the current project as a package RUN poetry install --no-root && \ rm -rf ~/.cache/pip -COPY docker-entrypoint.sh ./docker-entrypoint.sh - RUN poetry run python "$(poetry env info --path)/src/prowler/prowler/providers/m365/lib/powershell/m365_powershell.py" +COPY src/backend/ ./backend/ +COPY docker-entrypoint.sh ./docker-entrypoint.sh + WORKDIR /home/prowler/backend # Development image