Production build using latest version results in the below
Development build appears to be correct
This docker build works for dev with no issues
FROM node:20-alpine3.19
ENV NODE_OPTIONS=--openssl-legacy-provider
add app
COPY --chown=1001:1001 app app
RUN addgroup -S -g 1001 python
RUN adduser -D -S -G python -u 1001 python
WORKDIR /app
COPY ./app/package.json /app
RUN apk add git
RUN mkdir -p /home/react && chown -R 1001:1001 /home/react
RUN yarn add react-app-rewired
RUN yarn add stream-browserify
RUN yarn add buffer
RUN yarn add react-clear-browser-cache
RUN npm install -g serve
RUN node ./node_modules/react-clear-browser-cache/bin/cli.js
RUN yarn install
ENV NODE_OPTIONS="--max_old_space_size=4096 --openssl-legacy-provider"
start app
USER 1001:1001
CMD ["yarn", "run", "start"]
========================================================
this then results in the above images
FROM node:20-alpine3.19
ENV NODE_OPTIONS=--openssl-legacy-provider
add app
COPY --chown=1001:1001 app app
RUN addgroup -S -g 1001 python
RUN adduser -D -S -G python -u 1001 python
WORKDIR app
RUN apk add git
RUN mkdir -p /home/react && chown -R 1001:1001 /home/react
RUN yarn add react-app-rewired
RUN yarn add stream-browserify
RUN yarn add buffer
RUN yarn add react-clear-browser-cache
RUN npm install -g serve
RUN node ./node_modules/react-clear-browser-cache/bin/cli.js
RUN yarn install
RUN yarn build
Production build using latest version results in the below Development build appears to be correct
This docker build works for dev with no issues FROM node:20-alpine3.19 ENV NODE_OPTIONS=--openssl-legacy-provider
add app
COPY --chown=1001:1001 app app
RUN addgroup -S -g 1001 python RUN adduser -D -S -G python -u 1001 python
WORKDIR /app COPY ./app/package.json /app RUN apk add git
RUN mkdir -p /home/react && chown -R 1001:1001 /home/react RUN yarn add react-app-rewired RUN yarn add stream-browserify RUN yarn add buffer RUN yarn add react-clear-browser-cache RUN npm install -g serve RUN node ./node_modules/react-clear-browser-cache/bin/cli.js RUN yarn install ENV NODE_OPTIONS="--max_old_space_size=4096 --openssl-legacy-provider"
start app
USER 1001:1001 CMD ["yarn", "run", "start"]
======================================================== this then results in the above images FROM node:20-alpine3.19 ENV NODE_OPTIONS=--openssl-legacy-provider
add app
COPY --chown=1001:1001 app app
RUN addgroup -S -g 1001 python RUN adduser -D -S -G python -u 1001 python
WORKDIR app RUN apk add git
RUN mkdir -p /home/react && chown -R 1001:1001 /home/react RUN yarn add react-app-rewired RUN yarn add stream-browserify RUN yarn add buffer RUN yarn add react-clear-browser-cache RUN npm install -g serve RUN node ./node_modules/react-clear-browser-cache/bin/cli.js RUN yarn install RUN yarn build
start app
USER 1001:1001 CMD ["serve", "-s", "build"]