diff --git a/backend/Dockerfile b/backend/Dockerfile index 692020c..070d9e5 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -6,12 +6,16 @@ ENV GUNICORN_RUNNING=1 WORKDIR /app -RUN apt-get update && apt-get install -y --no-install-recommends \ +# System dependencies (Aliyun mirror for China) +RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \ + apt-get update && apt-get install -y --no-install-recommends \ gcc \ && rm -rf /var/lib/apt/lists/* +# Python dependencies COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \ + pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt COPY . . diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 624bd28..9369eb4 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,7 +2,7 @@ FROM node:20-alpine AS build WORKDIR /app COPY package*.json ./ -RUN npm ci +RUN npm config set registry https://registry.npmmirror.com && npm ci COPY . . RUN npm run build