From f537b6042e2faeb9ea26d63fa6f7012a32421053 Mon Sep 17 00:00:00 2001 From: infidel Date: Tue, 6 Dec 2022 11:52:38 +0700 Subject: [PATCH] Docker file update, chown npm cache dir --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 425afc1..488f24c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]