chore(uv): speed up Docker builds with mirrors (#1600)

* docker mirror defaults

* fix: make docker mirror defaults overridable

* fix docker compose default pypi index

* fix: restore upstream pypi defaults

* docs: remove misleading env example mirrors

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
Admire
2026-03-30 20:16:44 +08:00
committed by GitHub
parent b21792d9be
commit 4bb3c101a8
6 changed files with 16 additions and 1 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ FROM python:3.12-slim-bookworm
ARG NODE_MAJOR=22
ARG APT_MIRROR
ARG UV_INDEX_URL
# Optionally override apt mirror for restricted networks (e.g. APT_MIRROR=mirrors.aliyun.com)
RUN if [ -n "${APT_MIRROR}" ]; then \
@@ -42,7 +43,7 @@ COPY backend ./backend
# Install dependencies with cache mount
RUN --mount=type=cache,target=/root/.cache/uv \
sh -c "cd backend && uv sync"
sh -c "cd backend && UV_INDEX_URL=${UV_INDEX_URL:-https://pypi.org/simple} uv sync"
# Expose ports (gateway: 8001, langgraph: 2024)
EXPOSE 8001 2024