fix: use China mirrors for pip and npm in Dockerfiles
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -2,9 +2,9 @@ FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装依赖
|
||||
# 安装依赖(使用阿里云镜像)
|
||||
COPY backend/requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt
|
||||
|
||||
# 复制代码
|
||||
COPY backend/app ./app
|
||||
|
||||
@@ -2,9 +2,9 @@ FROM node:20-alpine as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 安装依赖
|
||||
# 安装依赖(使用淘宝镜像)
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm config set registry https://registry.npmmirror.com && npm ci
|
||||
|
||||
# 构建
|
||||
COPY frontend/ .
|
||||
|
||||
Reference in New Issue
Block a user