build(docker): 更新 Docker 镜像源为南京大学镜像地址

- 将 frontend Dockerfile 中的基础镜像从 gcr.io 切换到 gcr.nju.edu.cn
- 更新 offline Dockerfile 中的 nodejs20-debian12 镜像源
- 修改 export-cache.sh 脚本中的基础镜像列表为南京大学镜像
- 更新 Makefile.offline.mk 中的镜像拉取地址为本地镜像源
- 优化 export-cache.sh 脚本的格式和输出信息
- 添加缓存导出过程中的警告处理机制
This commit is contained in:
2026-02-02 22:48:41 +08:00
parent 16eb5cacf9
commit 05f3efc148
4 changed files with 8 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ _offline-export-base-images:
"ghcr.nju.edu.cn/astral-sh/uv:latest" \
"python:3.12-slim" \
"python:3.11-slim" \
"gcr.io/distroless/nodejs20-debian12" \
"gcr.nju.edu.cn/distroless/nodejs20-debian12" \
); for img in "$${images[@]}"; do echo " Pulling $$img..."; docker pull "$$img" 2>/dev/null || true; done'
@echo " Saving base images..."
@docker save -o $(CACHE_DIR)/images/base-images.tar \
@@ -61,7 +61,7 @@ _offline-export-base-images:
ghcr.nju.edu.cn/astral-sh/uv:latest \
python:3.12-slim \
python:3.11-slim \
gcr.io/distroless/nodejs20-debian12 2>/dev/null || echo " Warning: Some images may not exist"
gcr.nju.edu.cn/distroless/nodejs20-debian12 2>/dev/null || echo " Warning: Some images may not exist"
.PHONY: _offline-export-cache
_offline-export-cache:

View File

@@ -45,7 +45,7 @@ RUN npm config set registry https://registry.npmmirror.com && \
##### RUNNER
FROM gcr.io/distroless/nodejs20-debian12 AS runner
FROM gcr.nju.edu.cn/distroless/nodejs20-debian12 AS runner
WORKDIR /app
ENV NODE_ENV=production

View File

@@ -55,7 +55,7 @@ RUN npm config set registry https://registry.npmmirror.com && \
##### RUNNER
FROM gcr.io/distroless/nodejs20-debian12 AS runner
FROM gcr.nju.edu.cn/distroless/nodejs20-debian12 AS runner
WORKDIR /app
ENV NODE_ENV=production

View File

@@ -35,7 +35,7 @@ BASE_IMAGES=(
"ghcr.nju.edu.cn/astral-sh/uv:latest"
"python:3.12-slim"
"python:3.11-slim"
"gcr.io/distroless/nodejs20-debian12"
"gcr.nju.edu.cn/distroless/nodejs20-debian12"
)
for img in "${BASE_IMAGES[@]}"; do