Docker file update, chown npm cache dir

This commit is contained in:
infidel 2022-12-06 11:52:38 +07:00
parent 1f514ac187
commit f537b6042e

View File

@ -1,11 +1,10 @@
FROM node:lts
USER node
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/.npm
RUN chown -R 1000:1000 "/home/node/.npm"
WORKDIR /home/node/app
COPY . .
RUN npm install
RUN npm run build
RUN npm run build:fontawesome
USER node
COPY --chown=node:node . .
EXPOSE 5000
CMD ["npm", "run", "start"]
CMD ["npm", "run", "dev"]