From 8e30fcf213385202ee219c497699a4adeed868c8 Mon Sep 17 00:00:00 2001 From: infidel Date: Sat, 26 Nov 2022 10:46:13 +0700 Subject: [PATCH] Dockerfile restructered real user node now --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5a024b..791daa3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,9 @@ FROM node:16 -RUN adduser node root +USER node WORKDIR /home/node/app -RUN chmod -R 775 /home/node/app -RUN chown -R node:root /home/node/app -COPY package*.json /home/node/app +COPY --chown=node:node package*.json ./ +COPY --chown=node:node . . RUN npm install -COPY . /home/node/app RUN npm run build RUN npm run build:fontawesome EXPOSE 5000