Install uv via curl instead of pip in builder stage
pip install uv tries to fetch from PyPI which is unreachable from our VPS. Using curl installer directly avoids any PyPI dependency. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
+4
-2
@@ -12,7 +12,9 @@ ARG BASE_IMAGE=python:3.11-slim
|
|||||||
# ── Stage 1: dependency resolver ─────────────────────────────────────────────
|
# ── Stage 1: dependency resolver ─────────────────────────────────────────────
|
||||||
FROM python:3.11-slim AS builder
|
FROM python:3.11-slim AS builder
|
||||||
|
|
||||||
RUN pip install --no-cache-dir uv==0.11.31
|
# Install uv via curl (not pip) to avoid any PyPI/network dependency
|
||||||
|
RUN curl -LsSf https://astral.sh/uv/install.sh | \
|
||||||
|
UV_INSTALL_DIR=/usr/local sh
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -20,7 +22,7 @@ ENV UV_INDEX_URL="http://pypi.reg.darano.ir/simple/"
|
|||||||
|
|
||||||
COPY pyproject.toml uv.lock* ./
|
COPY pyproject.toml uv.lock* ./
|
||||||
|
|
||||||
RUN uv sync --frozen --no-dev --no-install-project
|
RUN /usr/local/uv/bin/uv sync --frozen --no-dev --no-install-project
|
||||||
|
|
||||||
# ── Stage 2a: admin runtime (python:3.11-slim, no Chrome needed) ──────────────
|
# ── Stage 2a: admin runtime (python:3.11-slim, no Chrome needed) ──────────────
|
||||||
FROM ${BASE_IMAGE} AS admin
|
FROM ${BASE_IMAGE} AS admin
|
||||||
|
|||||||
Reference in New Issue
Block a user