mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
changed python install to alpine python install
This commit is contained in:
@@ -3,14 +3,15 @@ FROM node:20-alpine AS backend-builder
|
|||||||
|
|
||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
|
|
||||||
# Install only what's absolutely necessary
|
# Install ortools from Alpine packages (if available)
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
python3 \
|
python3 \
|
||||||
py3-pip \
|
py3-pip \
|
||||||
build-base
|
build-base \
|
||||||
|
python3-dev
|
||||||
|
|
||||||
# Install ortools directly
|
# Try Alpine package first, then pip as fallback
|
||||||
RUN pip install --no-cache-dir ortools
|
RUN apk add py3-ortools 2>/dev/null || pip3 install --break-system-packages --no-cache-dir ortools
|
||||||
|
|
||||||
# Create symlink so python3 is callable as python
|
# Create symlink so python3 is callable as python
|
||||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
||||||
|
|||||||
Reference in New Issue
Block a user