docker-cn

docker-cn is a skill for Claude Code, Codex from guyulong/cn-agent-skills. It costs 20 tokens per session (684 once invoked), scanned B, original, MIT.

A guide for configuring Docker image mirrors in mainland China, where access to Docker Hub can be unreliable. Docker image mirrors are alternate registries that cache or serve container images.

In plain words
What is it for?
Setting up a private pull-through cache, configuring Docker Desktop or Linux, using cloud registry services, and checking mirror configuration.
Why use it?
It helps make image downloads more reliable while warning about the security and availability risks of unverified third-party mirrors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Setting up a private pull-through cache, configuring Docker Desktop or Linux, using cloud registry services, and checking mirror configuration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guyulong/cn-agent-skills/docker-cn
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add guyulong/cn-agent-skills --skill docker-cn
Clone the repo
git clone --depth 1 https://github.com/guyulong/cn-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docker-cn

README.md
[![agentmods](https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/docker-cn.svg)](https://agentmods.dev/skills/guyulong/cn-agent-skills/docker-cn)
Your own site
<a href="https://agentmods.dev/skills/guyulong/cn-agent-skills/docker-cn"><img src="https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/docker-cn.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00684
Opus 5 $0.00010 $0.00342
Sonnet 5 $0.00004 $0.00137
Haiku 4.5 $0.00002 $0.00068

Measured 8d ago against content hash 7686f28f8ca1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

docker-cn scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo systemctl daemon-reload
skills/docker-cn/SKILL.md · 97 lines

What it actually says

Docker 国内镜像配置

使用场景

Docker Hub 在国内访问不稳定时,配置镜像源以加速拉取。

重要提醒

第三方镜像源的安全风险: 任何非官方镜像源都可能被篡改、注入恶意内容或随时下线。使用前请自行验证其可用性、维护状态和安全性。生产环境建议自建 pull-through cache。

推荐做法

1. 自建 Registry Pull-Through Cache(最安全)

# 启动一个本地 pull-through cache,缓存 Docker Hub 内容
docker run -d -p 5000:5000 --restart=always \
  --name registry-mirror \
  -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \
  -v /data/registry:/var/lib/registry \
  registry:2

然后配置 daemon.json:

{
  "registry-mirrors": ["http://your-server:5000"]
}

2. 使用云厂商私有镜像服务(需登录)

  • 阿里云容器镜像服务:https://<your-id>.mirror.aliyuncs.com
  • 腾讯云容器镜像服务:https://mirror.ccs.tencentyun.com

这些需要注册账号并获取专属地址,相对更可控。

3. 第三方公共镜像源(需自行验证)

以下是一些曾存在的公共镜像源,请使用前自行验证其当前可用性、维护状态和安全性

地址 备注
DaoCloud https://docker.m.daocloud.io 需验证是否仍可用
其他 搜索"docker mirror 2025" 来源众多,质量参差不齐

不推荐将任何第三方源硬编码到生产环境配置中。

配置方法

macOS / Linux

编辑 /etc/docker/daemon.json

{
  "registry-mirrors": ["https://your-verified-mirror.example.com"]
}
sudo systemctl daemon-reload
sudo systemctl restart docker

Docker Desktop (macOS)

Settings → Docker Engine → 编辑 JSON → Apply & Restart

验证配置

# 确认镜像源已生效
docker info | grep -A 5 "Registry Mirrors"

# 测试拉取
docker pull hello-world

NPM / PIP 国内加速(参考)

# NPM
npm config set registry https://registry.npmmirror.com

# PIP
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

同样建议验证这些镜像源的时效性。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 97 lines · 20 tokens per session scan B 7686f28f8ca1

Subscribe to this mod's changes

docker-cn is a skill published in the GitHub repository guyulong/cn-agent-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 20 tokens to every session and 684 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ascend-docker

Create Docker containers for Huawei Ascend NPU development with proper device mappings and volume mounts. Use when setting up Ascend development environments in Docker, running CANN applications in containers, or creating isolated NPU development workspaces. Supports privileged mode (default), basic mode, and full…

ascend-ai-coding/awesome-ascend-skills · 76 tokens

docker-best-practices

A guide to writing Dockerfiles and building containers, which package an application with what it needs to run. It covers smaller images, faster rebuilds, fixed base versions, safer users, and keeping secrets out.

Wade-DevCode/awesome-coding-skills-cn · 29 tokens

ascend-docker

Create Docker containers for Huawei Ascend NPU development with proper device mappings and volume mounts. Use when setting up Ascend development environments in Docker, running CANN applications in containers, or creating isolated NPU development workspaces. Supports privileged mode (default), basic mode, and full…

Ascend/agent-skills · 76 tokens

ecspresso

ECS deployment tool - deploy, manage, and troubleshoot ECS services.

kayac/ecspresso · 17 tokens

docker-privesc

Escape Docker containers to host root via 5 techniques.

uphiago/recon-skills · 16 tokens

hardening-docker-containers-for-production

Hardening Docker containers for production involves applying security best practices aligned with CIS Docker Benchmark v1.8.0 to minimize attack surface, prevent privilege escalation, and enforce leas.

xalgorix/xalgorix · 43 tokens