We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b561fa commit 12c3c8fCopy full SHA for 12c3c8f
1 file changed
src/App/Dockerfile
@@ -8,14 +8,13 @@ WORKDIR /app/frontend
8
# Copy package files first for better caching
9
COPY package*.json ./
10
11
-# Install dependencies
12
-RUN npm ci --silent
+# Install dependencies once (cached unless package*.json changes)
+# npm rebuild esbuild --force ensures the correct platform binary inside the Linux image
13
+RUN npm ci && npm rebuild esbuild --force
14
-# Copy source files
15
+# Copy source files (node_modules excluded by .dockerignore)
16
COPY . ./
17
-RUN rm -rf node_modules && npm ci && npm rebuild esbuild --force
18
-
19
# Build the React app
20
RUN npm run build
21
0 commit comments