node container handled as node user with node home dir
This commit is contained in:
parent
b40b049edd
commit
c19591b4aa
@ -1,8 +1,11 @@
|
|||||||
FROM node:16
|
FROM node:16
|
||||||
WORKDIR /usr/src/app
|
RUN adduser node root
|
||||||
COPY package*.json /usr/src/app/
|
WORKDIR /home/node/app
|
||||||
|
RUN chmod -R 775 /home/node/app
|
||||||
|
RUN chown -R node:root /home/node/app
|
||||||
|
COPY package*.json /home/node/app
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . /usr/src/app
|
COPY . /home/node/app
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
RUN npm run build:fontawesome
|
RUN npm run build:fontawesome
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
Reference in New Issue
Block a user