]> Untitled Git - lemmy-ui.git/commitdiff
Use the 'node' user instead of root when running. (#1894)
authorcmp <camporter1@gmail.com>
Mon, 10 Jul 2023 14:50:25 +0000 (09:50 -0500)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 14:50:25 +0000 (10:50 -0400)
Dockerfile

index 92b3f7e62de6c3576b18a45b24d5db4f25047774..00baae145182ff8b502fcbd14ae8c49c9e10f1a4 100644 (file)
@@ -42,6 +42,9 @@ FROM node:alpine as runner
 COPY --from=builder /usr/src/app/dist /app/dist\r
 COPY --from=builder /usr/src/app/node_modules /app/node_modules\r
 \r
+RUN chown -R node:node /app\r
+\r
+USER node\r
 EXPOSE 1234\r
 WORKDIR /app\r
 CMD node dist/js/server.js\r