From 11b6ee7672721c5643892ca21ed7c9f8d8cf40f4 Mon Sep 17 00:00:00 2001 From: donpat1to Date: Mon, 3 Nov 2025 09:39:42 +0100 Subject: [PATCH] moved python installation from builder to image --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d434d0..1dacb27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,6 @@ FROM node:20-bullseye AS builder WORKDIR /app -# Install Python + OR-Tools -RUN apt-get update && apt-get install -y python3 python3-pip build-essential \ - && pip install --no-cache-dir ortools - -# Create symlink so python3 is callable as python -RUN ln -sf /usr/bin/python3 /usr/bin/python - # Copy root package files first COPY package*.json ./ COPY tsconfig.base.json ./ @@ -61,6 +54,13 @@ COPY --from=builder /app/ecosystem.config.cjs ./ COPY --from=builder /app/backend/src/database/ ./dist/database/ COPY --from=builder /app/backend/src/database/ ./database/ +# Install Python + OR-Tools +RUN apt-get update && apt-get install -y python3 python3-pip build-essential \ + && pip install --no-cache-dir ortools + +# Create symlink so python3 is callable as python +RUN ln -sf /usr/bin/python3 /usr/bin/python + # Copy init script and env template COPY docker-init.sh /usr/local/bin/ COPY .env.template ./