Use the 'node' user instead of root when running. (#1894)

This commit is contained in:
cmp 2023-07-10 09:50:25 -05:00 committed by Dessalines
parent 64df6663c8
commit 1d73a57297

View file

@ -42,6 +42,9 @@ FROM node:alpine as runner
COPY --from=builder /usr/src/app/dist /app/dist
COPY --from=builder /usr/src/app/node_modules /app/node_modules
RUN chown -R node:node /app
USER node
EXPOSE 1234
WORKDIR /app
CMD node dist/js/server.js