From 950b13a88a1ebd1504b48fc0f89086bd3eb5e850 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Sat, 25 Nov 2023 18:06:25 +0100 Subject: [PATCH] Dockerfile: separate run for npm config --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 158293d5..8c875d24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,13 @@ FROM docker.io/library/node:18-alpine@sha256:3428c2de886bf4378657da6fe86e105573a609c94df1f7d6a70e57d2b51de21f AS build_node_modules +RUN npm config set fund false &&\ + npm config set update-notifier false + # Copy Web UI COPY src/ /app/ WORKDIR /app -RUN npm config set fund false && npm ci --legacy-peer-deps +RUN npm ci --legacy-peer-deps # Copy build result to a new image. # This saves a lot of disk space. FROM docker.io/library/node:18-alpine@sha256:3428c2de886bf4378657da6fe86e105573a609c94df1f7d6a70e57d2b51de21f @@ -22,7 +25,7 @@ COPY --from=build_node_modules /app /app RUN mv /app/node_modules /node_modules # Enable this to run `npm run serve` -RUN npm config set fund false && npm i -g nodemon +RUN npm i -g nodemon # Install Linux packages RUN apk add -U --no-cache \