部署
- 作者仓库星标 0
- 作者仓库 skills-registry
- 领域
- 运维部署
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tomevault-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部接口密钥
- 需要 · Anthropic
- 兼容的系统
- Docker
- 运行环境要求
- Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步 — 确保 Docker 正在运行
运行:如果失败:则每 3 秒重试一次(最多 10 次尝试):如果 10 次尝试后仍然失败:停止执行并告诉用户:“Docker 未运行。请手动启动 Docker。”
第 2 步 — 确保 grokspawner 正在运行并且是最新的
检查是否正在运行: 如果没有输出,则启动它: 如果正在运行,检查其年龄: 解析时间戳并与现在进行比较。如果容器已超过 2 天,请重新创建它:不要启动任何其他服务。
第 3 步 — 检测 Docker 网络
网络名称因设置而异。从正在运行的 grok_spawner 容器中检测它:如果 `DOCKER_NETWORK` 为空,则回退:如果仍然为空,停止并告诉用户:“未找到 datagrok Docker 网络。平台是否正在运行?”
第 4 步 — 检测所需的镜像构建
检查现有图像:确定构建标志:构建`claude-runtime`,如果:`dockerfiles/claude-runtime/`出现在`$CHANGED_FILES`中或`grokky-claude-runtime:admin`在`$EXISTING_IMAGES`中找不到
第 6 步 — 构建并发布
如果构建失败,则停止并显示错误输出。如果构建成功:如果发布失败,则停止并显示错误输出。
第 7 步 — 报告结果
打印: Docker 是否已启动 grok_spawner 是否已启动 构建了哪些镜像(或“全部缓存”) 容器状态
# Deploy Grokky
This skill performs a full deployment of the Grokky package:
- Ensures Docker is running
- Ensures grok_spawner is running
- Builds required Docker images
- Starts runtime containers
- Builds and publishes the package
## Arguments
`$ARGUMENTS` may include:
- `key: <ANTHROPIC_API_KEY>`
- `host: <publish host>`
### Resolve arguments
1. If `host` is missing:
Ask: "Which host should I publish to? (e.g., `localhost`, `dev`, `public`)"
Wait for user input before continuing.
2. If `key` is missing:
Run:
```bash
echo $ANTHROPIC_API_KEY
```
If empty, ask the user to provide the key and wait.
## Resolve paths
Set variables explicitly:
```bash
GROKKY_ROOT=$(cd "${CLAUDE_SKILL_DIR}/../../.." && pwd)
DOCKER_DIR=$(cd "$GROKKY_ROOT/../../docker" && pwd)
COMPOSE_FILE="$DOCKER_DIR/localhost.bleeding-edge.docker-compose.yaml"
```
---
## Step 1 — Ensure Docker is running
Run:
```bash
docker info > /dev/null 2>&1
```
If it fails:
```bash
open -a Docker
```
Then retry every 3 seconds (max 10 attempts):
```bash
for i in {1..10}; do
sleep 3
docker info > /dev/null 2>&1 && break
done
```
If still failing after 10 attempts:
Stop execution and tell user: "Docker is not running. Please start Docker manually."
---
## Step 2 — Ensure grok_spawner is running and fresh
Check if running:
```bash
docker ps --filter "name=grok_spawner" --format "{{.Names}}"
```
If no output, start it:
```bash
cd "$DOCKER_DIR"
GROK_SPAWNER_CORE_MODE=true docker compose -f "$COMPOSE_FILE" up -d grok_spawner
```
If running, check its age:
```bash
docker inspect --format '{{.Created}}' grok_spawner
```
Parse the timestamp and compare to now. If the container is older than 2 days, recreate it:
```bash
cd "$DOCKER_DIR"
GROK_SPAWNER_CORE_MODE=true docker compose -f "$COMPOSE_FILE" up -d --force-recreate grok_spawner
```
Do NOT start any other services.
---
## Step 3 — Detect the Docker network
The network name varies by setup. Detect it from the running grok_spawner container:
```bash
DOCKER_NETWORK=$(docker ps --filter "name=grok_spawner" --format "{{.Networks}}" | head -1)
```
If `DOCKER_NETWORK` is empty, fall back:
```bash
DOCKER_NETWORK=$(docker network ls --format "{{.Name}}" | grep -E "datagrok" | head -1)
```
If still empty, stop and tell user: "No datagrok Docker network found. Is the platform running?"
---
## Step 4 — Detect required image builds
```bash
cd "$GROKKY_ROOT"
CHANGED_FILES=$(git diff --name-only HEAD -- dockerfiles/; git status --short -- dockerfiles/)
```
Check existing images:
```bash
EXISTING_IMAGES=$(docker images --format "{{.Repository}}:{{.Tag}}" | grep grokky || true)
```
Determine build flags:
- Build `claude-runtime` if:
- `dockerfiles/claude-runtime/` appears in `$CHANGED_FILES` OR
- `grokky-claude-runtime:admin` not found in `$EXISTING_IMAGES`
- Build `mcp-server` if:
- `dockerfiles/mcp-server/` appears in `$CHANGED_FILES` OR
- `grokky-mcp-server:admin` not found in `$EXISTING_IMAGES`
If neither needs building, skip to Step 6.
---
## Step 5 — Build images (only those flagged in Step 4)
### claude-runtime
```bash
cd "$GROKKY_ROOT/dockerfiles/claude-runtime"
docker build --build-arg ANTHROPIC_API_KEY=$KEY -t grokky-claude-runtime:admin .
docker rm -f grokky-claude-runtime 2>/dev/null || true
```
### mcp-server
```bash
cd "$GROKKY_ROOT/dockerfiles/mcp-server"
docker build -t grokky-mcp-server:admin .
docker rm -f grokky-mcp-server 2>/dev/null || true
```
---
## Step 6 — Build and publish
```bash
cd "$GROKKY_ROOT"
npm run build
```
If build fails, stop and show the error output.
If build succeeds:
```bash
grok publish $HOST
```
If publish fails, stop and show the error output.
---
## Step 7 — Report results
Print:
- Whether Docker was started
- Whether grok_spawner was started
- Which images were built (or "all cached")
- Container statuses
- Publish result
---
> Source: [datagrok-ai/public](https://github.com/datagrok-ai/public) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->
章节与文件索引
按说明文件中的顺序排列。
论点
解决争论
解析路径
第 1 步 — 确保 Docker 正在运行
第 2 步 — 确保 grokspawner 正在运行并且是最新的
文件/命令 -> $ARGUMENTS · key: <ANTHROPIC_API_KEY> · host: <publish host> · host · localhost · dev · public · key
内容校验值 -> 130c12ea5c7c
当前原文的自动摘译,尚未人工审校。
论点
$ARGUMENTS可能包括:key: <ANTHROPIC_API_KEY>host: <publish host>解决争论
如果缺少
host:询问:“我应该发布到哪个主机?(例如,localhost、dev、public)”等待用户输入,然后继续。如果缺少key:运行:解析路径
显式设置变量: