changed to simple python installation

This commit is contained in:
2025-10-21 23:42:11 +02:00
parent 45509b1dbd
commit 4689966783

View File

@@ -3,24 +3,17 @@ FROM node:20-alpine AS backend-builder
WORKDIR /app/backend WORKDIR /app/backend
# Install Python and required build tools for OR-Tools # Install only what's absolutely necessary
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 \ python3 \
py3-pip \ py3-pip \
build-base \ build-base
python3-dev \
cmake \
make \
g++ \
linux-headers
# Install python package which provides 'python' command # Install ortools directly
RUN apk add --no-cache python3 py3-pip && \ RUN pip3 install --no-cache-dir ortools
ln -s /usr/bin/python3 /usr/bin/python
# Upgrade pip and install Python dependencies # Create symlink so python3 is callable as python
RUN python3 -m pip install --upgrade pip && \ RUN ln -sf /usr/bin/python3 /usr/bin/python
python3 -m pip install ortools
# Copy backend files # Copy backend files
COPY backend/package*.json ./ COPY backend/package*.json ./