ci(docker): 使用国内镜像源加速依赖安装并添加pull命令
修改web和api的Dockerfile,使用国内镜像源加速pnpm和uv的依赖安装 在Makefile中添加pull命令用于拉取基础镜像
This commit is contained in:
parent
5a66ff80c2
commit
9410313f91
10
Makefile
10
Makefile
@ -3,6 +3,16 @@
|
||||
|
||||
PYTEST_ARGS ?=
|
||||
|
||||
pull:
|
||||
bash docker/pull_image.sh python:3.12-slim
|
||||
bash docker/pull_image.sh node:20-slim
|
||||
bash docker/pull_image.sh node:20-alpine
|
||||
bash docker/pull_image.sh quay.io/coreos/etcd:v3.5.5
|
||||
bash docker/pull_image.sh milvusdb/milvus:v2.5.6
|
||||
bash docker/pull_image.sh neo4j:5.26
|
||||
bash docker/pull_image.sh minio/minio:RELEASE.2023-03-20T20-16-18Z
|
||||
bash docker/pull_image.sh ghcr.io/astral-sh/uv:0.7.2
|
||||
|
||||
start:
|
||||
@if [ ! -f .env ]; then \
|
||||
echo "Error: .env file not found. Please create it from .env.template"; \
|
||||
|
||||
@ -52,7 +52,7 @@ ENV HTTP_PROXY=$HTTP_PROXY \
|
||||
|
||||
# 如果网络还是不好,可以在后面添加 --index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --no-dev
|
||||
uv sync --no-dev --index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
# 激活虚拟环境并添加到PATH
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
@ -19,7 +19,7 @@ COPY ./web/package*.json ./
|
||||
COPY ./web/pnpm-lock.yaml* ./
|
||||
|
||||
# 安装依赖
|
||||
RUN pnpm install
|
||||
RUN pnpm install --registry=https://registry.npmmirror.com
|
||||
|
||||
# 复制源代码
|
||||
COPY ./web .
|
||||
|
||||
Loading…
Reference in New Issue
Block a user