From bd7b098ed668187360b248f6a6abf9323e5b2b63 Mon Sep 17 00:00:00 2001 From: Dion Date: Sun, 10 Nov 2024 14:57:30 +0100 Subject: [PATCH] Docker upgrade node version && remove node_modules after build --- starsky/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/starsky/Dockerfile b/starsky/Dockerfile index 29de2e4b3e..c93f12a1f7 100644 --- a/starsky/Dockerfile +++ b/starsky/Dockerfile @@ -12,7 +12,7 @@ # Stage 1 Front-end # # docker buildx imagetools inspect node:18-alpine -FROM --platform=$BUILDPLATFORM node:18-alpine AS react-build +FROM --platform=$BUILDPLATFORM node:20-alpine AS react-build ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -27,6 +27,7 @@ RUN for i in 1 2 3; do \ npm ci --legacy-peer-deps --prefer-offline --no-audit --no-fund --ignore-scripts && break || sleep 15; \ done && \ npm run build && \ + rm -rf node_modules && \ echo "react done" # no alpine build since there is no support for multi-arch