← 返回 Skills 市场
ugvfpdcuwfnh

Docker Container Rerun All

作者 HongWei Jiang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
19
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install docker-container-rerun-all
功能描述
Sequentially check and optionally update all docker run containers that already have fixed recreate commands recorded in long-term memory. Use when the user...
使用说明 (SKILL.md)

Docker Container Rerun All

Batch-check remembered docker run containers conservatively.

Use this skill to discover every container that already has a fixed recreate command recorded in long-term memory, then process them one by one with the same image-Id comparison workflow used by docker-container-rerun.

Preconditions

Use this skill only when all of the following are true:

  1. The target containers were originally created with docker run, not docker compose.
  2. Each target container already has a full fixed recreate command recorded in MEMORY.md.
  3. The sibling skill docker-container-rerun is installed and available locally.
  4. The current machine can run Docker commands against the target Docker daemon.
  5. The user understands that --apply may stop, remove, and recreate containers when image Ids changed.

Do not use this skill when recreate commands are missing, incomplete, reconstructed from memory, or only partially known.

Dependencies

This skill has two explicit dependencies:

  • sibling skill: docker-container-rerun
  • long-term memory file: MEMORY.md

Required sibling skill

This skill calls the bundled script from the sibling skill directory:

  • ../docker-container-rerun/scripts/update_docker_run_container.py

If docker-container-rerun is missing or broken, fix that first before using this skill.

Required MEMORY.md structure

This skill parses container recreate commands from the section header below inside MEMORY.md:

## 已记住的 Docker 容器固定重建命令

Under that section, each remembered container entry should include:

  1. a list item whose bold label contains the container name in backticks
  2. descriptive text mentioning docker run
  3. a fenced bash code block containing the exact recreate command

Example entry using autoheal:

## 已记住的 Docker 容器固定重建命令

- **`autoheal`**:固定 docker run 重建命令
```bash
docker run -d \
  --name autoheal \
  --restart unless-stopped \
  -e AUTOHEAL_CONTAINER_LABEL=all \
  -e AUTOHEAL_INTERVAL=30 \
  -e AUTOHEAL_START_PERIOD=300 \
  -e CURL_TIMEOUT=30 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  willfarrell/autoheal:latest

Keep the recreate command exact. Do not rewrite it from `docker inspect`, and do not omit flags that matter.

## Apply Modes

This skill supports two modes:

### Non-apply mode (default)

Command:

```bash
python3 scripts/run_all_docker_reruns.py

Behavior:

  • reads MEMORY.md
  • discovers remembered containers dynamically
  • pulls the latest image for each remembered container
  • compares current image Id vs latest image Id
  • reports which containers need recreation
  • does not stop, remove, or recreate any container

Use this mode when the user wants a safe inspection pass first.

Apply mode

Command:

python3 scripts/run_all_docker_reruns.py --apply

Behavior:

  • performs the same checks as non-apply mode
  • for containers whose image Id changed, runs the sibling docker-container-rerun apply workflow
  • may stop, remove, and recreate matching containers sequentially
  • leaves already up-to-date containers unchanged

Use this mode only when the user explicitly wants real container recreation.

Workflow

  1. Read MEMORY.md and locate the section that stores fixed recreate commands for remembered docker run containers.
  2. Build the working container list dynamically from memory.
    • Do not hardcode container names in the skill logic.
    • If the user adds more remembered recreate commands later, include them automatically.
  3. For each discovered container, preserve the exact remembered docker run command.
  4. Process containers sequentially, never in parallel.
  5. Use the bundled script to run the same check/apply workflow as docker-container-rerun for each container.
  6. Report results in three groups with polished Chinese wording:
    • 已更新
    • 已是最新
    • 执行失败
  7. For every updated container, include:
    • container name
    • image reference
    • image tag
    • previous image Id
    • latest image Id
    • version hint when the image tag contains a meaningful version string
  8. Prefer a Telegram-friendly Chinese summary instead of dumping raw JSON directly to the user.

Safety Rules

  • Treat MEMORY.md as the source of truth for the container list and fixed recreate commands.
  • Do not reconstruct missing flags from docker inspect.
  • Do not silently edit remembered docker run commands.
  • Run containers one by one in sequence.
  • If memory parsing fails for a container, put it in the failed group and continue with the next one.
  • If the user asked only to create the skill, do not execute updates.
  • When actual recreation is requested later, use --apply explicitly.

Bundled Script

Use the bundled script for deterministic batch execution from the skill directory:

python3 scripts/run_all_docker_reruns.py

Add --apply only when the user explicitly wants to recreate containers that need updates:

python3 scripts/run_all_docker_reruns.py --apply

The script will:

  • parse remembered containers from MEMORY.md
  • discover the current container set dynamically
  • call the bundled docker-container-rerun script once per container
  • keep execution sequential
  • emit JSON with discovered containers, raw per-container results, and grouped summary

Output Format

Prefer a compact Chinese grouped report for chat surfaces.

Recommended Chinese Template

Use a detailed Chinese report by default. Append a final 重点异常提示 section that highlights failed containers, non-running containers, and health states like starting or unhealthy.

Docker 容器批量检查结果

本次共处理:\x3Ctotal> 个容器
- 已更新:\x3Cupdated_count> 个
- 已是最新:\x3Cup_to_date_count> 个
- 执行失败:\x3Cfailed_count> 个

【本次发现的容器】
1. \x3Ccontainer_name> - \x3Cimage>
2. \x3Ccontainer_name> - \x3Cimage>
...

【已更新】
1. \x3Ccontainer_name>
   - 镜像:\x3Cimage>
   - Tag:\x3Ctag>
   - Image Id:\x3Cold_id> → \x3Cnew_id>
   - 版本提示:\x3Cversion_hint_or_无>
   - 当前状态:\x3Cstatus>
   - 健康检查:\x3Chealth_or_无>
   - 最近日志:\x3Clogs_tail_or_无>

【已是最新】
1. \x3Ccontainer_name>
   - 镜像:\x3Cimage>
   - Tag:\x3Ctag>
   - Image Id:\x3Csame_id>
   - 当前状态:\x3Cstatus>
   - 健康检查:\x3Chealth_or_无>

【执行失败】
1. \x3Ccontainer_name>
   - 原因:\x3Cerror>

【重点异常提示】
1. \x3Ccontainer_name>
   - 异常类型:\x3Chealth_or_status_or_failure>
   - 说明:\x3Cshort_reason>

Updated

For each updated container, report:

  • container_name
  • image
  • tag
  • current_image_id -> latest_image_id
  • version_hint when available
  • post-update container status and health if available

Already Up To Date

For each unchanged container, report:

  • container_name
  • image
  • tag
  • unchanged image Id

Failed

For each failure, report:

  • container_name
  • failure reason

Notes

  • This skill intentionally depends on MEMORY.md instead of a hardcoded container list.
  • This skill intentionally depends on the sibling docker-container-rerun skill for the single-container check/apply workflow.
  • Relative paths are used so the skill remains portable after installation, as long as both skill directories keep their normal sibling layout.
安全使用建议
This skill appears purpose-aligned and not malicious from the provided artifacts. Before installing or using it, confirm the sibling docker-container-rerun skill is trusted, run the non-apply mode first, review the MEMORY.md recreate commands, and use --apply only when you are comfortable with containers being stopped, removed, and recreated.
功能分析
Type: OpenClaw Skill Name: docker-container-rerun-all Version: 1.0.0 The skill automates batch updates for Docker containers by parsing and executing 'docker run' commands stored within a markdown file (MEMORY.md). While this behavior is aligned with the stated purpose of container management, the practice of extracting shell commands from a documentation file and executing them via subprocess calls (in scripts/run_all_docker_reruns.py) presents a significant risk of Remote Code Execution (RCE) if the source file is manipulated. It also has a hard dependency on a sibling skill directory ('docker-container-rerun'), which it invokes to perform the actual container recreation.
能力评估
Purpose & Capability
The Docker checking and optional recreation behavior matches the stated purpose, but the apply path can stop, remove, and recreate containers.
Instruction Scope
The skill scopes itself to containers with fixed recreate commands in MEMORY.md and says --apply should be used only on explicit user request.
Install Mechanism
There is no install spec and the required sibling skill/script is not part of this artifact set, so users should verify the sibling skill separately.
Credentials
Docker daemon access is proportionate for this skill, but it is high-impact authority over local services.
Persistence & Privilege
The skill deliberately treats long-term MEMORY.md entries as the source of truth for recreate commands, which is useful but requires the memory contents to be trusted and current.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install docker-container-rerun-all
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /docker-container-rerun-all 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial public release: portable relative paths, explicit docker-container-rerun dependency, MEMORY.md example, apply mode docs, and preconditions.
元数据
Slug docker-container-rerun-all
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Docker Container Rerun All 是什么?

Sequentially check and optionally update all docker run containers that already have fixed recreate commands recorded in long-term memory. Use when the user... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 19 次。

如何安装 Docker Container Rerun All?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install docker-container-rerun-all」即可一键安装,无需额外配置。

Docker Container Rerun All 是免费的吗?

是的,Docker Container Rerun All 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Docker Container Rerun All 支持哪些平台?

Docker Container Rerun All 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Docker Container Rerun All?

由 HongWei Jiang(@ugvfpdcuwfnh)开发并维护,当前版本 v1.0.0。

💬 留言讨论