Skip to content

Commit

Permalink
copy the right folder
Browse files Browse the repository at this point in the history
  • Loading branch information
kuanfandevops committed Mar 14, 2024
1 parent 5c00681 commit 3bd731f
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions react/Dockerfile-Openshift
Original file line number Diff line number Diff line change
Expand Up @@ -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;"]

0 comments on commit 3bd731f

Please sign in to comment.