From 5bcdd4de0b208abf64b6e455a03fe807fef640d5 Mon Sep 17 00:00:00 2001 From: sakthi-aot Date: Tue, 19 Mar 2024 19:18:50 -0600 Subject: [PATCH] updated --- app/caseflow_web/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/caseflow_web/Dockerfile b/app/caseflow_web/Dockerfile index 313b5e81d..e111ab1e2 100644 --- a/app/caseflow_web/Dockerfile +++ b/app/caseflow_web/Dockerfile @@ -7,6 +7,9 @@ ENV PATH /app/node_modules/.bin:$PATH COPY package.json package-lock.json ./ +# Run npm install and other build steps as root +USER root + RUN npm install --silent RUN mkdir -p node_modules/.cache && chmod -R 777 node_modules/.cache @@ -18,6 +21,9 @@ RUN npm run build # Production stage FROM nginx:1.17-alpine as production-stage +# Set the user to root explicitly +USER root + # Copy nginx configuration COPY nginx.conf /etc/nginx/nginx.conf