diff --git a/Dockerfile b/Dockerfile index e2ff0cf..b331a2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ -FROM node:20-alpine AS development +FROM node:21-alpine AS development ENV NODE_ENV development # Add a work directory WORKDIR /usr/app +# copy files as a non-root user. The 'node' user is built in the Node image. +RUN chown node:node ./ +USER node # Cache and Install dependencies COPY ./react-app/package.json . COPY ./react-app/package-lock.json .