Skip to content

Commit

Permalink
Merge pull request #433 from bcgov/bug/node-root-user
Browse files Browse the repository at this point in the history
Update Dockerfile
  • Loading branch information
barrfalk authored Dec 13, 2023
2 parents 6d611ce + 70ecc46 commit ce2ab20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ RUN npm run all:ci \
&& npm run all:build \
&& npm run client:purge
EXPOSE 8000
# Change ownership of the directory to 'node' user
RUN chown -R node:node /opt/app-root/src
# Switch to non-root user
USER node
CMD ["npm", "run", "start"]

0 comments on commit ce2ab20

Please sign in to comment.