Skip to content

Commit f2d7e0e

Browse files
fix for docker file error in pipeline
1 parent 6039776 commit f2d7e0e

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/frontend/Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
# Multi-stage Dockerfile for React frontend with Python backend support using UV
22

33
# Stage 1: Node build environment for React
4-
FROM node:18-alpine AS frontend-builder
4+
FROM node:20-alpine AS frontend-builder
55

66
WORKDIR /app/frontend
77

88
# Copy package files first for better caching
99
COPY package*.json ./
1010

11-
# Install dependencies
12-
RUN npm ci --silent
13-
14-
# Copy source files
11+
# Copy all source files
1512
COPY . ./
1613

17-
RUN rm -rf node_modules && npm ci && npm rebuild esbuild --force
18-
19-
# Build the React app
20-
RUN npm run build
14+
# Install dependencies and build in a single layer to avoid BuildKit overlay issues
15+
RUN --mount=type=cache,target=/root/.npm \
16+
npm ci && npm run build
2117

2218
# Stage 2: Python build environment with UV
2319
FROM python:3.11-slim-bullseye AS python-builder

0 commit comments

Comments
 (0)