From 3bd731f695b4ea70416a22081aea29d5865ae7a9 Mon Sep 17 00:00:00 2001 From: Kuan Fan Date: Thu, 14 Mar 2024 14:46:13 -0700 Subject: [PATCH] copy the right folder --- react/Dockerfile-Openshift | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/react/Dockerfile-Openshift b/react/Dockerfile-Openshift index cf7fb9b3..4cd9406c 100644 --- a/react/Dockerfile-Openshift +++ b/react/Dockerfile-Openshift @@ -11,22 +11,16 @@ WORKDIR /usr/src/app COPY ./ ./ RUN npm install -g npm@latest RUN npm install -# RUN yes | npm install -g --only=dev -RUN echo $NODE_PATH RUN pwd && \ ls -l && \ - ls -l node_modules && \ - ls -l /usr/local/lib/node_modules -ENV NODE_ENV=production -ENV NODE_PATH=/usr/local/lib/node_modules:/usr/src/app/node_modules -RUN yes | npm run build -RUN pwd && \ - ls -l + ls -l node_modules +RUN NODE_ENV=production | npm run build # Stage 2: Copy the JS React SPA into the Nginx HTML directory FROM artifacts.developer.gov.bc.ca/docker-remote/bitnami/nginx:1.24.0 COPY ./nginx.conf /opt/bitnami/nginx/conf/ -COPY --from=builder /usr/src/app/public/build /app +COPY --from=builder /usr/src/app/public /app +RUN ls -l /app EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"]