Skip to content

Commit

Permalink
Merge pull request #434 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 ce2ab20 + d3ac6fc commit 44c7d56
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ FROM docker.io/node:16.15.0-alpine
ENV NO_UPDATE_NOTIFIER=true
WORKDIR /opt/app-root/src/app
COPY . /opt/app-root/src
RUN npm run all:ci \
RUN npm install --unsafe-perm \
&& 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 44c7d56

Please sign in to comment.