diff --git a/build/node.dockerfile b/build/node.dockerfile index 4b8e231..0d71649 100644 --- a/build/node.dockerfile +++ b/build/node.dockerfile @@ -11,7 +11,7 @@ RUN chown node:node ./ USER node # Copy package files first -COPY package.json package-lock.json* . +COPY --chown=node:node package.json package-lock.json* . # Install app dependencies ENV NODE_ENV=production @@ -20,7 +20,7 @@ RUN npm ci --only=production --ignore-scripts && \ npm cache clean --force # Copy the builded files -COPY ./dist/* . +COPY --chown=node:node ./dist/* . # Return to root user to remove build dependencies USER root