feat: Fixing Dockerfile for non-root user and app building

This commit is contained in:
gauvainboiche
2026-09-16 23:22:45 +02:00
parent 64a3d9b556
commit 0b469c2e10
2 changed files with 11 additions and 2 deletions
+5 -2
View File
@@ -2,14 +2,17 @@ FROM node:20-alpine
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm install --omit=dev
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && node -e "require('express')"
COPY server.js ./
COPY src ./src
COPY public ./public
COPY locales ./locales
RUN chown -R node:node /app
USER node
ENV PORT=3000
EXPOSE 3000