返回 Skill 列表
编程开发进阶
Docker 容器化 Skill
自动生成 Dockerfile 和 docker-compose.yml。一键部署。
📋 SKILL.md 完整代码
--- name: docker-skill description: >- 自动生成 Dockerfile 和 docker-compose.yml。一键部署。 Use when working on docker skill tasks. allowed-tools: Read,Write,Bash --- # Docker 容器化 Skill ## Quick Start 1. Save as `~/.claude/skills/docker-skill/SKILL.md` 2. Restart Claude Code 3. Type `/docker-skill` or describe your task naturally 4. Claude auto-triggers when your task matches the description ## Instructions - Understand the user's specific context and needs - Apply domain best practices consistently - Provide actionable, specific guidance with examples - Verify all outputs before presenting to user ## Gotchas - Test with a fresh Claude instance after changes - Keep SKILL.md under 500 lines; use references/ for details - Description is the trigger key — make it specific and keyword-rich
🚀 怎么用
1. 复制上面的 SKILL.md 代码 2. 保存为 ~/.claude/skills/docker-skill/SKILL.md 3. 重启 Claude Code 4. 输入 /docker-skill 或直接描述任务触发 5. AI 自动按 Skill 流程执行
为什么用 Docker
「在我电脑上能跑」→ Docker 解决的就是这个问题。把应用和所有依赖打包成一个容器,在任何机器上都能一模一样的运行。开发环境=测试环境=生产环境。告别环境配置噩梦。