Use `node` user rather than root within Dockerfile
This commit is contained in:
parent
2923e1b373
commit
76632cea0b
|
|
@ -17,7 +17,12 @@ RUN npm ci --only=production
|
|||
COPY picture-gallery-server .
|
||||
RUN npm run build-server
|
||||
|
||||
RUN chown node:node -R /usr/src/app/picture-gallery-server/dist && \
|
||||
chown node:node -R /usr/src/app/picture-gallery-client/build
|
||||
|
||||
VOLUME /usr/src/app/public
|
||||
EXPOSE 3001
|
||||
|
||||
USER node
|
||||
# we are still in the server directory
|
||||
CMD npm --prefix ../picture-gallery-client/ run set-environment && node dist/app.js
|
||||
Loading…
Reference in New Issue