From 4b7ccb0a30b504c1f89e244cd024b5facbff988c Mon Sep 17 00:00:00 2001 From: v6ole Date: Tue, 4 Aug 2026 16:03:10 +0800 Subject: [PATCH] build: use domestic package registries --- backend/Dockerfile | 3 ++- frontend/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index c6318d4..33a57a9 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -6,7 +6,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /app COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +ARG PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple +RUN pip install --no-cache-dir --index-url "$PIP_INDEX_URL" -r requirements.txt COPY . . diff --git a/frontend/Dockerfile b/frontend/Dockerfile index d78c8b3..a7f50d3 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -3,7 +3,8 @@ FROM node:20-alpine AS builder WORKDIR /app COPY package.json ./ -RUN npm install +ARG NPM_REGISTRY=https://registry.npmmirror.com +RUN npm config set registry "$NPM_REGISTRY" && npm install COPY . . RUN npm run build