💚(ci) restore npm cache

This commit is contained in:
Sylvain Zimmer
2026-02-25 23:12:23 +01:00
parent bdbb1fe7ce
commit 7a8bd1f865
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ FROM docker:27-cli AS docker-cli
# Main image
FROM node:22-slim
ENV npm_config_cache=/tmp/npm-cache
ENV PLAYWRIGHT_BROWSERS_PATH=/tmp/playwright-browsers
ENV HOME=/tmp
@@ -30,7 +31,7 @@ RUN npm install
COPY . ./
# Fix ownership for the user (use numeric UID to avoid lookup issues)
RUN chown -R $DOCKER_USER /app
RUN chown -R $DOCKER_USER /tmp/npm-cache /app
# Run test with unprivileged user
USER $DOCKER_USER
+3 -1
View File
@@ -1,9 +1,11 @@
FROM node:22-alpine AS frontend-deps
ENV npm_config_cache=/tmp/npm-cache
ARG DOCKER_USER=1000
WORKDIR /home/frontend/
RUN chown -R ${DOCKER_USER} /home/frontend
RUN mkdir -p /tmp/npm-cache && chown -R ${DOCKER_USER} /tmp/npm-cache /home/frontend
# Install deps and run all npm commands as the user running the container
USER ${DOCKER_USER}