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
|
WORKDIR /app
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖(使用阿里云镜像)
|
||||||
COPY backend/requirements.txt .
|
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
|
COPY backend/app ./app
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ FROM node:20-alpine as builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖(使用淘宝镜像)
|
||||||
COPY frontend/package*.json ./
|
COPY frontend/package*.json ./
|
||||||
RUN npm ci
|
RUN npm config set registry https://registry.npmmirror.com && npm ci
|
||||||
|
|
||||||
# 构建
|
# 构建
|
||||||
COPY frontend/ .
|
COPY frontend/ .
|
||||||
|
|||||||
Reference in New Issue
Block a user