Run nodebb docker process under node user (#9913)

Closes #9888
isekai-main
bukajsytlos 3 years ago committed by GitHub
parent ed4ebd2277
commit ced8e72a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,17 +1,20 @@
FROM node:lts
RUN mkdir -p /usr/src/app
RUN mkdir -p /usr/src/app && \
chown -R node:node /usr/src/app
WORKDIR /usr/src/app
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
COPY install/package.json /usr/src/app/package.json
COPY --chown=node:node install/package.json /usr/src/app/package.json
USER node
RUN npm install --only=prod && \
npm cache clean --force
COPY . /usr/src/app
COPY --chown=node:node . /usr/src/app
ENV NODE_ENV=production \
daemon=false \

Loading…
Cancel
Save