From 0645e6b7b31b042b20e600bf667e23fca6b4ef70 Mon Sep 17 00:00:00 2001 From: syoul Date: Wed, 3 Dec 2025 16:00:13 +0100 Subject: [PATCH] fix: utiliser WORKDIR au lieu de cd pour le build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Utilisation de WORKDIR pour changer de répertoire de manière fiable - Cela évite les problèmes avec cd qui peuvent échouer silencieusement - WORKDIR garantit que npm est disponible dans le bon contexte - Retour à /app après le build --- Dockerfile.business | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile.business b/Dockerfile.business index 175720d..da21351 100644 --- a/Dockerfile.business +++ b/Dockerfile.business @@ -53,10 +53,11 @@ RUN mkdir -p .techradar/data && \ cp custom.css .techradar/src/styles/custom.css 2>/dev/null || echo "custom.css not found, skipping" # Builder l'application en mode production pour éviter Fast Refresh -# Vérifier que npm est disponible et que nous sommes dans le bon répertoire -RUN which npm && pwd && ls -la .techradar/package.json -RUN cd .techradar && pwd && which npm && npm --version && npm run build:data -RUN cd .techradar && npm run build +# Utiliser WORKDIR pour changer de répertoire de manière fiable +WORKDIR /app/.techradar +RUN npm run build:data +RUN npm run build +WORKDIR /app # Exposition du port interne EXPOSE 3000