Docker /.npm

This commit is contained in:
infidel 2022-12-06 14:35:56 +07:00
parent 6d49860832
commit b20fb98861

View File

@ -4,10 +4,12 @@ RUN mkdir -p /home/node/app/.npm && chown -R node:node /home/node/app/.npm
WORKDIR /home/node/.npm WORKDIR /home/node/.npm
RUN chown -R 1000:1000 "/home/node/.npm" RUN chown -R 1000:1000 "/home/node/.npm"
WORKDIR /.npm WORKDIR /.npm
RUN chown -R 1000660000:0 "/.npm"
RUN chown -R 1000660000:0 "/home/node/app/.npm" RUN chown -R 1000660000:0 "/home/node/app/.npm"
WORKDIR /home/node/app WORKDIR /home/node/app
USER node USER node
COPY --chown=node:node . . COPY --chown=node:node . .
RUN npm config set cache /home/node/app/.npm/
RUN npm install RUN npm install
EXPOSE 5000 EXPOSE 5000
CMD ["npm", "run", "dev"] CMD ["npm", "run", "dev"]