refactor(docker): Remove global npm installation from Dockerfiles

This commit is contained in:
Daniel Hiller
2026-04-17 22:36:41 +00:00
parent 20eb57de4c
commit 4e23f3c8a9
2 changed files with 3 additions and 6 deletions

View File

@@ -8,8 +8,7 @@ WORKDIR /app
COPY server .
RUN npm install npm --global \
&& npm install \
RUN npm install \
&& npm run build \
&& npm prune --production
@@ -28,8 +27,7 @@ RUN npm install npm --global \
FROM node:22-alpine
RUN apk -U upgrade \
&& apk add bash python3 squid --no-cache \
&& npm install npm --global
&& apk add bash python3 squid --no-cache
USER node
WORKDIR /app

View File

@@ -1,7 +1,6 @@
FROM node:22-alpine
RUN apk -U upgrade \
&& apk add bash build-base python3 xdg-utils --no-cache \
&& npm install npm --global
&& apk add bash build-base python3 xdg-utils --no-cache
WORKDIR /app