From b20fb98861f64d7f1820abbfa84ab246895c7ec7 Mon Sep 17 00:00:00 2001 From: infidel Date: Tue, 6 Dec 2022 14:35:56 +0700 Subject: [PATCH] Docker /.npm --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index c606c30..8196623 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,12 @@ RUN mkdir -p /home/node/app/.npm && chown -R node:node /home/node/app/.npm WORKDIR /home/node/.npm RUN chown -R 1000:1000 "/home/node/.npm" WORKDIR /.npm +RUN chown -R 1000660000:0 "/.npm" RUN chown -R 1000660000:0 "/home/node/app/.npm" WORKDIR /home/node/app USER node COPY --chown=node:node . . +RUN npm config set cache /home/node/app/.npm/ RUN npm install EXPOSE 5000 CMD ["npm", "run", "dev"]