docker-mirror

Docker 镜像拉取工具,自动切换镜像源。当官方 registry (docker.io) 拉取超时或失败时,自动尝试备用镜像(docker.1ms.run、docker.m.daocloud.io)。适用于网络受限的 Linux 环境。需要 sg (sgdocker group) 和 docker 已安装。触发场景:(1) 用户请求拉取 Docker 镜像,(2) docker pull 失败,(3) 任何涉及 Docker 镜像下载的场景。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "docker-mirror" with this command: npx skills add kitsudog/docker-mirror

Docker Mirror

自动处理 Docker 镜像拉取失败,切换到国内镜像源。

工作原理

  1. 先尝试官方 registry (docker.io)
  2. 失败则按顺序尝试备用镜像
  3. 成功后 tag 回原名并清理镜像残留

使用方法

# 拉取镜像(核心用法)
bash ./scripts/docker.sh pull <镜像名>[:标签]

# 示例
bash ./scripts/docker.sh pull nginx:latest
bash ./scripts/docker.sh pull redis:alpine
bash ./scripts/docker.sh pull postgres:15

其他 Docker 命令

非 pull 命令直接透传给 docker:

bash ./scripts/docker.sh ps -a
bash ./scripts/docker.sh images
bash ./scripts/docker.sh run -it nginx:latest
bash ./scripts/docker.sh stop nginx

镜像源状态

最新验证结果(2026-03-29):

镜像源状态备注
docker.io❌ 超时国内访问不稳定
docker.1ms.run✅ 可用主要备用源
docker.m.daocloud.io✅ 可用DaoCloud 镜像

已验证可正常拉取:hello-worldnginx:latestnginx:alpine

故障排除

如果 docker.sh pull 失败:

  1. 检查 Docker daemon 是否运行:

    bash ./scripts/docker.sh ps
    
  2. 查看本地镜像:

    bash ./scripts/docker.sh images
    
  3. 手动指定镜像源:

    bash ./scripts/docker.sh pull docker.1ms.run/library/nginx
    

环境依赖

  • sg 命令(sgdocker 组权限)
  • docker 已安装且 daemon 运行中

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

考公备考追踪

朱批录 · 国考备考追踪 Skill。当用户发来套题成绩、错题截图、备考打卡或复习进度时触发。 核心功能:识别错题截图 → 分类错题原因 → 更新本地记录 → 生成每日总结 → 导出 Excel / 同步飞书。 触发关键词:做了一套题、今天做了、错了几道、帮我分析、备考打卡、行测、申论、 判断推理、资料分析、言语...

Registry SourceRecently Updated
2490Profile unavailable
General

知乎数据获取 | Zhihu Data Fetcher

知乎数据获取 - 极简设计,支持三级认证降级(Browser Profile → File Cookie → Fallback),确保数据可靠获取 Zhihu Data Fetcher - Minimalist design with three-level auth fallback (Browser Prof...

Registry SourceRecently Updated
6390Profile unavailable
General

A股分析技能包装器

A股分析技能包装器,基于akshare数据源。支持实时行情、个股分析、板块轮动、资金流向等A股分析功能。使用自然语言查询A股市场数据。

Registry SourceRecently Updated
2850Profile unavailable
General

QWeather China

基于中国气象局数据的完整天气服务,通过和风天气API提供实时天气、天气预报、生活指数、空气质量等全方位天气信息。专为中国用户优化,数据更准确,功能更全面。

Registry SourceRecently Updated
3570Profile unavailable