From bff66ba4a7def6b00199cdf45870972f8f29c6b7 Mon Sep 17 00:00:00 2001 From: Abdoulaye535 Date: Sat, 8 Feb 2025 15:46:45 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fb640acb..d1c1b1be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,20 @@ RUN apk add --no-cache --update python3 py3-pip bash ADD ./webapp/requirements.txt /tmp/requirements.txt # Install dependencies -RUN pip3 install --no-cache-dir -q -r /tmp/requirements.txt +#RUN pip3 install --no-cache-dir -q -r /tmp/requirements.txt + +# Installer python3, pip et venv +RUN apk add --no-cache --update python3 py3-pip py3-venv + +# Créer un environnement virtuel +RUN python3 -m venv /venv + +# Activer l’environnement et installer les dépendances +RUN /venv/bin/pip install --no-cache-dir -q -r /tmp/requirements.txt + +# Ajouter ceci pour exécuter Python avec l’environnement virtuel +ENV PATH="/venv/bin:$PATH" + # Add our code ADD ./webapp /opt/webapp/