Skip to content

Commit

Permalink
Change ordering of node Dockerfile's USER directive (#3141)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwateratmsft authored Aug 13, 2021
1 parent 68f2ec2 commit 42ff646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/templates/node/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM node:14-alpine
ENV NODE_ENV=production
USER node
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY . .
{{#each ports}}
EXPOSE {{ . }}
{{/each}}
RUN chown -R node /usr/src/app
USER node
CMD {{{ toQuotedArray nodeCmdParts }}}

0 comments on commit 42ff646

Please sign in to comment.