From: cmp <camporter1@gmail.com> Date: Mon, 10 Jul 2023 14:50:25 +0000 (-0500) Subject: Use the 'node' user instead of root when running. (#1894) X-Git-Url: http://these/git/%7B%60%24%7BarchiveTodayUrl%7D/%24%7B%60data:application/static/git-favicon.png?a=commitdiff_plain;h=462bdb10c91159fdb6f427908f506e95a7cac439;p=lemmy-ui.git Use the 'node' user instead of root when running. (#1894) --- diff --git a/Dockerfile b/Dockerfile index 92b3f7e..00baae1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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