diff --git a/Dockerfile b/Dockerfile index e15f274..cf190e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,15 @@ FROM python:3.11-slim AS builder WORKDIR /app -# Install uv — download the pre-built binary directly from GitHub releases -# and add it to PATH for this layer. -RUN curl -LsSf https://astral.sh/uv/install.sh | sh \ - && . /usr/local/env 2>/dev/null || true +# python:3.11-slim has neither curl nor pip. Bootstrap pip via ensurepip, +# then use it to install uv from the local PyPI mirror. +RUN python -m ensurepip --upgrade \ + && python -m pip install --break-system-packages \ + --index-url https://pypi.reg.darano.ir/simple/ \ + --trusted-host pypi.reg.darano.ir \ + uv -ENV PATH="/root/.local/bin:$PATH" \ +ENV PATH="/usr/local/bin:$PATH" \ UV_DEFAULT_INDEX="https://pypi.reg.darano.ir" COPY pyproject.toml uv.lock* ./