mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
changed to simple python installation
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -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 ./
|
||||||
|
|||||||
Reference in New Issue
Block a user