Skip to content

Commit

Permalink
Merge pull request #436 from bcgov/bug/node-root-user
Browse files Browse the repository at this point in the history
Bug/node root user
  • Loading branch information
barrfalk authored Dec 13, 2023
2 parents 7ca9aad + 79882b8 commit 19ce912
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ FROM docker.io/node:16.15.0-alpine
ENV NO_UPDATE_NOTIFIER=true
WORKDIR /opt/app-root/src/app
COPY . /opt/app-root/src
USER node

# Install dependencies with --unsafe-perm flag and build the application
RUN npm install --unsafe-perm \
&& npm run all:ci \
&& npm run all:build \
&& npm run client:purge

EXPOSE 8000
# Switch to non-root user
CMD ["npm", "run", "start"]

0 comments on commit 19ce912

Please sign in to comment.