Skip to content

Commit

Permalink
move NODE_ENV right before run build
Browse files Browse the repository at this point in the history
  • Loading branch information
kuanfandevops committed Mar 14, 2024
1 parent 99fa3aa commit 5c00681
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions react/Dockerfile-Openshift
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
# && npm install -D webpack webpack-cli
# RUN yes | npm run dist
FROM artifacts.developer.gov.bc.ca/docker-remote/node:20 as builder
ENV NODE_ENV=production
ENV NODE_PATH=/usr/local/lib/node_modules:/usr/src/app/node_modules
WORKDIR /usr/src/app
COPY ./ ./
RUN npm install -g npm@latest
RUN npm install
RUN yes | npm install -g --only=dev
# 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
Expand Down

0 comments on commit 5c00681

Please sign in to comment.