Skip to content

Commit 8dc6f7c

Browse files
committed
Update Dockerfile to use Node 14 and streamline build process
- Downgraded Node.js version from 18 to 14 for compatibility. - Simplified npm installation by removing cache cleaning and legacy peer dependencies flag. - Removed increased memory allocation for the build process, optimizing the Dockerfile for a more straightforward build.
1 parent e5016d6 commit 8dc6f7c

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

webapp/Dockerfile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
# Stage 1: Build the React application
2-
FROM node:18 as build
2+
FROM node:14 as build
33
WORKDIR /app
4-
5-
# Copy package files
64
COPY package*.json ./
7-
8-
# Clear npm cache and install dependencies
9-
RUN npm cache clean --force && \
10-
npm install --legacy-peer-deps && \
11-
npm install @jridgewell/gen-mapping
12-
13-
# Copy the rest of the application
5+
RUN npm install
146
COPY . .
15-
16-
# Build the application with increased memory allocation
17-
ENV NODE_OPTIONS="--max-old-space-size=4096"
187
RUN npm run build
198

209
# Stage 2: Serve the app with nginx

0 commit comments

Comments
 (0)