Move user declaration to the last command before commit
This commit is contained in:
parent
0985dc4b90
commit
61539a1b79
@ -7,10 +7,10 @@ WORKDIR /.npm
|
|||||||
RUN chown -R 1000660000:0 "/.npm"
|
RUN chown -R 1000660000:0 "/.npm"
|
||||||
RUN chown -R 1000:1000 "/home/node/app/.npm"
|
RUN chown -R 1000:1000 "/home/node/app/.npm"
|
||||||
WORKDIR /home/node/app
|
WORKDIR /home/node/app
|
||||||
USER node
|
|
||||||
COPY --chown=node:node . .
|
COPY --chown=node:node . .
|
||||||
RUN npm config set cache /home/node/app/.npm/
|
RUN npm config set cache /home/node/app/.npm/
|
||||||
RUN npm install
|
RUN npm install
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
USER node
|
||||||
CMD ["npm", "run", "dev"]
|
CMD ["npm", "run", "dev"]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user