File tree Expand file tree Collapse file tree 5 files changed +5693
-3500
lines changed Expand file tree Collapse file tree 5 files changed +5693
-3500
lines changed Original file line number Diff line number Diff line change 1+ # Dockerfile
2+ # 24.10.4
3+
14# Stage 1, Building React Application
25
3- FROM node:20.5.0 -slim as react-build
6+ FROM node:lts -slim as react-build
47
58WORKDIR /app
69COPY . .
@@ -14,10 +17,10 @@ COPY . .
1417# RUN npm install --legacy-peer-deps
1518
1619# method 2: clean-install will install dependencies from the package-lock.json (immutable)
17- # RUN npm clean-install
20+ RUN npm clean-install
1821
1922# method 2 with legacy
20- RUN npm clean-install --legacy-peer-deps
23+ # RUN npm clean-install --legacy-peer-deps
2124
2225# # Build
2326
@@ -27,7 +30,7 @@ RUN npm run build
2730
2831# Stage 2, Setting Up Production Environment
2932
30- FROM nginx:1.25.1
33+ FROM nginx:1.27
3134
3235COPY default.conf.template /etc/nginx/conf.d/default.conf.template
3336COPY --from=react-build /app/build /usr/share/nginx/html
You can’t perform that action at this time.
0 commit comments