Skip to content

Commit 42ff646

Browse files
authored
Change ordering of node Dockerfile's USER directive (#3141)
1 parent 68f2ec2 commit 42ff646

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
FROM node:14-alpine
22
ENV NODE_ENV=production
3-
USER node
43
WORKDIR /usr/src/app
54
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
65
RUN npm install --production --silent && mv node_modules ../
76
COPY . .
87
{{#each ports}}
98
EXPOSE {{ . }}
109
{{/each}}
10+
RUN chown -R node /usr/src/app
11+
USER node
1112
CMD {{{ toQuotedArray nodeCmdParts }}}

0 commit comments

Comments
 (0)