← Back to Skills Marketplace
zhaohaixin

Docker 镜像拉取工具

by POC · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ⚠ suspicious
2
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install docker-image-puller
Description
使用 Python 脚本下载 Docker 镜像并打包为 tar 文件。当用户说"下载镜像"、"拉取镜像"、"pull xxx"、"帮我下载 nginx 镜像"等触发此技能。支持 SOCKS5 代理直连下载(推荐)和国内镜像站加速两种模式。
README (SKILL.md)

Docker 镜像拉取工具

从任意 Docker Registry 拉取镜像,打包为 .tar 文件供离线 docker load 使用。

资源文件

  • 脚本:scripts/docker_image_puller.py
  • 配置:config.json(首次运行时引导生成)

首次使用 — 配置引导

检查 config.jsonarch 字段:

  • 若为空("" 或不存在),引导用户完成首次配置:
    1. 下载方式 — 代理下载(推荐,最稳定)或镜像加速
    2. 代理地址(代理模式)— 默认 127.0.0.1:7890
    3. 镜像站地址(镜像模式)— 或让脚本运行时显示推荐列表
    4. 目标架构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 跨次复用,用户可随时要求切换下载模式或指定架构
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install docker-image-puller
  3. After installation, invoke the skill by name or use /docker-image-puller
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug docker-image-puller
Version 1.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Docker 镜像拉取工具?

使用 Python 脚本下载 Docker 镜像并打包为 tar 文件。当用户说"下载镜像"、"拉取镜像"、"pull xxx"、"帮我下载 nginx 镜像"等触发此技能。支持 SOCKS5 代理直连下载(推荐)和国内镜像站加速两种模式。 It is an AI Agent Skill for Claude Code / OpenClaw, with 2 downloads so far.

How do I install Docker 镜像拉取工具?

Run "/install docker-image-puller" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Docker 镜像拉取工具 free?

Yes, Docker 镜像拉取工具 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Docker 镜像拉取工具 support?

Docker 镜像拉取工具 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Docker 镜像拉取工具?

It is built and maintained by POC (@zhaohaixin); the current version is v1.2.0.

💬 Comments