From dd49d8c9744cc3527337467d4da0d34cffb23ed0 Mon Sep 17 00:00:00 2001 From: nfel Date: Tue, 4 Aug 2026 23:24:35 +0330 Subject: [PATCH] Add PIP_INDEX_URL fallback for uv install in worker stage curl to astral.sh is unreachable from Iran. Added pip install fallback from the local registry mirror. Also set PIP_INDEX_URL env var so pip respects the mirror by default in subsequent RUN layers. Co-authored-by: Qwen-Coder --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b713f3e..7fcc8da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,10 +67,15 @@ RUN printf 'Types: deb\nURIs: http://ubuntu.parsvds.com/ubuntu/\nSuites: noble n python3 python3-venv \ && rm -rf /var/lib/apt/lists/* \ && curl -LsSf https://astral.sh/uv/install.sh | sh \ - && . /usr/local/env 2>/dev/null || true + && . /usr/local/env 2>/dev/null || true \ + || pip install --break-system-packages \ + --index-url https://pypi.reg.darano.ir/simple/ \ + --trusted-host pypi.reg.darano.ir \ + uv ENV PATH="/usr/local/bin:$PATH" \ UV_DEFAULT_INDEX="https://pypi.reg.darano.ir" \ + PIP_INDEX_URL="https://pypi.reg.darano.ir/simple/" \ # Chromium is pre-installed at /usr/bin/chromium CHROME_BINARY=/usr/bin/chromium \ CHROMEDRIVER_PATH=/usr/bin/chromedriver \