← 返回 Skills 市场
2
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install docker-image-puller
功能描述
使用 Python 脚本下载 Docker 镜像并打包为 tar 文件。当用户说"下载镜像"、"拉取镜像"、"pull xxx"、"帮我下载 nginx 镜像"等触发此技能。支持 SOCKS5 代理直连下载(推荐)和国内镜像站加速两种模式。
使用说明 (SKILL.md)
Docker 镜像拉取工具
从任意 Docker Registry 拉取镜像,打包为 .tar 文件供离线 docker load 使用。
资源文件
- 脚本:
scripts/docker_image_puller.py - 配置:
config.json(首次运行时引导生成)
首次使用 — 配置引导
检查 config.json 中 arch 字段:
- 若为空(
""或不存在),引导用户完成首次配置:- 下载方式 — 代理下载(推荐,最稳定)或镜像加速
- 代理地址(代理模式)— 默认
127.0.0.1:7890 - 镜像站地址(镜像模式)— 或让脚本运行时显示推荐列表
- 目标架构 —
amd64(x86 服务器,默认)或arm64v8(ARM 服务器)
- 若
arch已有值,跳过引导,直接使用该配置
script_dir 自动解析为技能自带的 scripts/ 目录。
config.json 结构
{
"mode": "proxy",
"proxy_address": "127.0.0.1:7890",
"mirror_url": "",
"arch": "",
"script_dir": "",
"version": 1
}
arch 为空时触发首次引导。
执行流程
1. 读取配置,构建命令
读取 config.json,根据 mode 构建命令:
代理模式:
cd "\x3Cscript_dir>" && printf 'n\
n' | python3 docker_image_puller.py -i "\x3C镜像名>" --socks5 --socks5-proxy "\x3C代理地址>" -a "\x3C架构>"
镜像加速模式:
cd "\x3Cscript_dir>" && printf 'y\
y\
\x3C镜像站地址>' | python3 docker_image_puller.py -i "\x3C镜像名>" -a "\x3C架构>"
2. Sub-Agent 后台下载
使用 sessions_spawn 启动隔离子任务,不阻塞主会话:
sessions_spawn(
task="读取 \x3Cskill-dir>/config.json 获取配置。为镜像 '\x3C镜像名>' 构建下载命令。用 exec 执行(background=true, timeout=600)。每 30 秒用 process 轮询进度。完成后报告 tar 路径和 docker load 命令。失败则报告具体原因。",
mode="run",
runtime="subagent",
timeoutSeconds=900
)
立即回复用户:
📥 已启动后台下载
\x3C镜像名>(架构:\x3C架构>)... 完成后会通知你,可继续其他操作。
3. 结果报告
| 结果 | 处理方式 |
|---|---|
| ✅ 成功 | 报告 tar 文件路径 + docker load -i \x3C路径> |
| ⏱ 超时 | "下载超时,请检查网络或代理" |
| 🔒 认证失败 401 | 请用户提供仓库用户名/密码 |
| 🌐 网络错误 | 报告具体 HTTP 错误码和失败 URL |
| 💾 磁盘不足 | 提醒用户清理磁盘空间 |
补充说明
- 输出路径:
\x3Cscript_dir>/images/\x3C仓库>_\x3C标签>_\x3C架构>.tar - 脚本运行完毕后自动清理
tmp/临时目录,无需手动处理 config.json跨次复用,用户可随时要求切换下载模式或指定架构
安全使用建议
Review this skill before installing. It is plausibly intended to download Docker images, but you should avoid using private registry credentials until TLS verification is fixed, and you should ensure image names are validated and passed safely rather than interpolated into shell commands.
能力评估
Purpose & Capability
Downloading Docker images into tar files is purpose-aligned, but the implementation disables TLS certificate verification for registry authentication, manifests, and layer downloads, which weakens both credential protection and image integrity.
Instruction Scope
The skill instructs the agent to build and execute a shell command containing the user-provided image name. The artifacts do not show validation or safe argument construction at the instruction layer.
Install Mechanism
There is no install spec, but the skill expects python3 and Python libraries such as requests and tqdm. This is a metadata/setup completeness issue rather than direct malicious behavior.
Credentials
Network access, local file writes, temporary directories, and output tar files are expected for a Docker image puller, but users should be aware it can download large remote content and write it under the skill directory.
Persistence & Privilege
The skill reuses config.json across runs and launches a bounded background sub-agent/process for downloads. This is disclosed and purpose-aligned, but it is still persistent configuration and background activity.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install docker-image-puller - 安装完成后,直接呼叫该 Skill 的名称或使用
/docker-image-puller触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
- 首次配置流程优化:若 config.json 的 arch 字段为空,自动触发用户引导,选择目标架构(amd64 或 arm64v8)。
- 优化配置说明,明确支持多平台架构,提醒用户首次需手动选择架构类型。
- 下载流程提示增强,用户在后台下载时将明确收到目标架构信息。
- 允许随时切换下载模式或指定架构,提高灵活性与可操作性。
v1.1.0
- Updated documentation for Chinese-speaking users with improved clarity and detailed workflow in Chinese.
- Enhanced usage instructions, trigger phrases, and setup guidance for both proxy and mirror modes.
- Reformatted command examples and workflow steps for better readability.
- Clarified result reporting and error handling steps.
- No functional/script changes—documentation (SKILL.md) only.
v1.0.0
- Initial release of docker-image-puller: download and save Docker images as tar files for offline use.
- Supports SOCKS5 proxy and mirror acceleration for image downloads.
- Interactive setup for config on first run, including proxy/mirror settings and architecture selection.
- Runs Docker image pulls in the background and notifies users upon completion.
- Clear error handling for timeout, network, auth, and disk space issues.
元数据
常见问题
Docker 镜像拉取工具 是什么?
使用 Python 脚本下载 Docker 镜像并打包为 tar 文件。当用户说"下载镜像"、"拉取镜像"、"pull xxx"、"帮我下载 nginx 镜像"等触发此技能。支持 SOCKS5 代理直连下载(推荐)和国内镜像站加速两种模式。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2 次。
如何安装 Docker 镜像拉取工具?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install docker-image-puller」即可一键安装,无需额外配置。
Docker 镜像拉取工具 是免费的吗?
是的,Docker 镜像拉取工具 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Docker 镜像拉取工具 支持哪些平台?
Docker 镜像拉取工具 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Docker 镜像拉取工具?
由 POC(@zhaohaixin)开发并维护,当前版本 v1.2.0。
推荐 Skills