fix(#8): script-dependencies — 移除 registry.mercator.cn 引用

This commit is contained in:
2026-07-13 10:37:13 +00:00
parent 9cdf9f664e
commit f11b7c6e31
@@ -140,7 +140,7 @@ registry.mercator.cn/agentgis/gis-ext-{功能}:{版本}
```dockerfile
# Dockerfile.ext
FROM registry.mercator.cn/agentgis/gis-base:latest
FROM gis-base:latest
# 安装系统依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -154,7 +154,7 @@ RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/c
```
**合规检测规则:**
- `FROM` 只能引用 `registry.mercator.cn/agentgis/*` 系列镜像
- `FROM` 只能引用 `gis-base:*` 系列镜像
- 不允许 `FROM` 外部镜像库(安全性)
- `RUN pip` 的来源 URL 必须在白名单内(PyPI 官方默认通过)
- `RUN apt` 来源必须在 `apt allowlist`
@@ -165,7 +165,7 @@ RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/c
脚本发布 → 检测到 Dockerfile.ext
→ 合规检测通过
→ 构建自定义镜像
→ 推送到 registry.mercator.cn/agentgis/custom/{suite_id}:{version}
→ 推送到自建 Docker Registry 或 Gitea Packages OCI
→ 将镜像 ID 写入脚本 metadata
```
@@ -234,7 +234,7 @@ RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/c
4. 都不行 → 看看能不能用轻量安装(级别一)
5. 真不行 → 写 Dockerfile.ext(级别三)
6. 完成 metadata.yaml 声明
7. agc publish → 合规检测自动处理
7. 通过 API 发布(详见套件发布指南)
```
**SuiteForge 应在初始化套件时根据脚本内容自动推断依赖**,无需开发者手动填写 metadata。开发者只需要告诉 SuiteForge "我想处理 Excel 文件",剩下的由 Agent 完成。