mirror of
https://github.com/suitenumerique/messages.git
synced 2026-08-17 21:25:41 +02:00
💚(ci) restore npm cache
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user