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 FROM node:lts
USER node RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/.npm WORKDIR /home/node/.npm
RUN chown -R 1000:1000 "/home/node/.npm"
WORKDIR /home/node/app WORKDIR /home/node/app
COPY . . USER node
RUN npm install COPY --chown=node:node . .
RUN npm run build
RUN npm run build:fontawesome
EXPOSE 5000 EXPOSE 5000
CMD ["npm", "run", "start"] CMD ["npm", "run", "dev"]