Skip to content

Commit d691a46

Browse files
revert fix for docker file error 1
1 parent f2d7e0e commit d691a46

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/frontend/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
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:20-alpine AS frontend-builder
4+
FROM node:18-alpine AS frontend-builder
55

66
WORKDIR /app/frontend
77

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

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

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
17+
RUN rm -rf node_modules && npm ci && npm rebuild esbuild --force
18+
19+
# Build the React app
20+
RUN npm run build
1721

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

0 commit comments

Comments
 (0)