# @devflow-tools/plugin-docker

> Docker 专家插件 — 镜像优化、Compose 编排、安全扫描、多阶段构建。（v0.17.8）

## 安装

```bash
npm install @devflow-tools/plugin-docker
```

## 使用

插件通过 DevFlow/Claude Code 使用：

```text
/devflow:docker <你的任务>
```

## 能力与知识源

## MCP Tools

| Tool | 说明 | 关键参数 |
|------|------|---------|
| `docker_dockerize_project` | 项目 Docker 化：分析项目 → 多阶段 Dockerfile → Compose → 构建验证 | `projectRoot` |

## Knowledge Sources

| 来源 | URL | SPA |
|------|-----|-----|
| Docker 官方文档 | https://docs.docker.com | Yes |

## Memory

插件自动注入以下最佳实践：
- 多阶段构建：build 阶段 + runtime 阶段分离
- `.dockerignore` 排除 node_modules、测试、.git
- 镜像使用 Alpine/Distroless 最小化攻击面
- Compose 使用 profiles 区分环境
- 非 root 用户运行应用（`USER node`）
- 安全扫描集成（docker scout / trivy）


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT
