From 626d39d1bb57920b3710f65381e4373087154a78 Mon Sep 17 00:00:00 2001 From: Chaim Date: Mon, 13 Apr 2026 14:36:16 +0000 Subject: [PATCH] Fix Dockerfile: use python:3.12-slim for pre-built wheels pymupdf and other native deps need compilation on Alpine. Switch to Debian-based python:3.12-slim which has pre-built wheels available, avoiding the need for gcc/build-essential. Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1459e6c..d870594 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,18 +22,23 @@ COPY web-ui/ ./ ENV NEXT_TELEMETRY_DISABLED=1 RUN npm run build -# ── Stage 3: Install Python deps ───────────────────────────── -FROM python:3.12-alpine AS pydeps +# ── Stage 3: Install Python deps (use slim for pre-built wheels) ── +FROM python:3.12-slim AS pydeps WORKDIR /opt/api COPY mcp-server/ ./mcp-server/ RUN pip install --no-cache-dir ./mcp-server # ── Stage 4: Runner ─────────────────────────────────────────── -FROM python:3.12-alpine AS runner +FROM python:3.12-slim AS runner WORKDIR /app -# Install Node.js (needed for Next.js standalone server) -RUN apk add --no-cache nodejs +# Install Node.js 20.x +RUN apt-get update && apt-get install -y --no-install-recommends \ + curl ca-certificates \ + && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ + && apt-get install -y --no-install-recommends nodejs \ + && apt-get purge -y curl \ + && rm -rf /var/lib/apt/lists/* ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1