From 0eff2a5605e0acab6c03542f743222c2b3598df2 Mon Sep 17 00:00:00 2001 From: Tristan <135599584+Tristan-WorkGH@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:56:15 +0100 Subject: [PATCH] Optimize Dockerfile Optimize image layers --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 281aa64..d90155e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,12 @@ FROM python:3.8.12-alpine RUN adduser -D powsybl USER powsybl WORKDIR /home/powsybl + +COPY scripts/requirements.txt ./ +RUN pip3 install --no-cache-dir -r requirements.txt + COPY scripts/ ./ -RUN pip3 install -r requirements.txt # We call a script here, but it's overwritten at job execution by the way # depending at which script should be applied # it's a dry-run call by default to avoid unexpected impact with this image