Skip to content

Commit

Permalink
Merge pull request #10 from ScilifelabDataCentre/dockerfile_branch
Browse files Browse the repository at this point in the history
Modifying Dockerfile to run node as non-root user
  • Loading branch information
SevLG authored Jan 10, 2024
2 parents e561ce5 + 5a12b31 commit 66223bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down

0 comments on commit 66223bf

Please sign in to comment.