Fixing python...

This commit is contained in:
2025-10-21 01:16:59 +02:00
parent 66212229f5
commit 714738dcba
3 changed files with 38 additions and 35 deletions

View File

@@ -1,13 +1,12 @@
FROM debian:12 AS base
WORKDIR /opt/app
ENV PYTHONPATH=/app
RUN apt-get update && \
apt-get install -y curl unzip cron ca-certificates python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
# install BunJs
RUN curl -fsSL https://bun.com/install | bash
ENV PATH="/root/.bun/bin:$PATH"
# symlink python3 to python
RUN ln -s /usr/bin/python3 /usr/bin/python
# install dependencies into temp directory
# this will cache them and speed up future builds
@@ -17,8 +16,8 @@ COPY package.json bun.lock /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
# and install python dependencies
COPY ./requirements.txt .
RUN pip3 install --break-system-packages -r ./requirements.txt
RUN python3 -m pip install -r requirements.txt
# RUN python3 -m pip install -U python-dotenv
# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY package.json bun.lock /temp/prod/