fix(docker): update the Frontend docker to with the node user perms

This commit is contained in:
Damien Laureaux 2024-10-24 16:49:24 +02:00
parent 652e665726
commit f9f7dc9b1c
No known key found for this signature in database
GPG key ID: 3802EADA1C1C604D

View file

@ -24,10 +24,10 @@ FROM node:22-alpine
WORKDIR /app
# Copy built assets from the builder stage
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/public ./public
COPY --chown=node:node --from=builder /app/.next ./.next
COPY --chown=node:node --from=builder /app/node_modules ./node_modules
COPY --chown=node:node --from=builder /app/package.json ./package.json
COPY --chown=node:node --from=builder /app/public ./public
# Run the Docker image as node instead of root
USER node