← 返回 Skills 市场
Dockerfile Generator
作者
HonestQiao
· GitHub ↗
· v1.0.0
641
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install dockerfile-generator
功能描述
Automatically generate optimized Dockerfiles for various app types with multi-stage builds and best practice performance enhancements.
使用说明 (SKILL.md)
Dockerfile Generator
根据应用类型自动生成优化的 Dockerfile。
功能
- 多语言支持 (Node.js, Python, Go, Java等)
- 多阶段构建优化
- 最佳实践自动应用
- 性能优化
触发词
- "生成Dockerfile"
- "docker配置"
- "containerize"
支持模板
# Node.js
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]
# Python
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "main.py"]
# Go (多阶段构建)
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o main .
FROM alpine
COPY --from=builder /app/main .
EXPOSE 8080
CMD ["./main"]
安全使用建议
This skill appears coherent and low-risk: it only generates Dockerfile text. Before using results in production, manually review generated Dockerfiles for security best practices (avoid embedding secrets, pin exact base-image versions, add a non-root user, minimize exposed ports and installed packages, and validate multi-stage build outputs). Because it's instruction-only, it won't fetch code or credentials on its own, but never paste secrets into prompts or files you ask it to containerize.
功能分析
Type: OpenClaw Skill
Name: dockerfile-generator
Version: 1.0.0
The skill is designed to generate Dockerfiles, but the `skill.yaml` implementation in JavaScript directly embeds user-provided `config.version` and `config.port` values into the Dockerfile string without sanitization. This creates a Dockerfile injection vulnerability, allowing an attacker to inject arbitrary commands into the generated Dockerfile if they can control these configuration parameters. While this is a critical vulnerability (potential RCE during Docker build), there is no clear evidence of intentional malicious behavior such as data exfiltration or self-exploitation within the provided code, classifying it as suspicious rather than malicious.
能力评估
Purpose & Capability
Name and description (generate optimized Dockerfiles) match the provided SKILL.md templates and the generateDockerfile implementation in skill.yaml. No unrelated credentials, binaries, or configuration paths are requested.
Instruction Scope
SKILL.md and the included templates limit behavior to producing Dockerfile text for Node.js, Python, and Go. There are no instructions to read system files, access environment variables, call external endpoints, or transmit data.
Install Mechanism
No install spec and no code files to execute beyond the instruction text; the skill is instruction-only, which is the lowest-risk install model.
Credentials
The skill requests no environment variables, credentials, or config paths. The templates and implementation do not reference secrets or other external services.
Persistence & Privilege
always is false and the skill does not request persistent system presence or modify other skills. Autonomous invocation (model invocation enabled) is the platform default and is not by itself a concern here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install dockerfile-generator - 安装完成后,直接呼叫该 Skill 的名称或使用
/dockerfile-generator触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Dockerfile Generator.
- Supports automatic, optimized Dockerfile creation for Node.js, Python, Go, and Java applications.
- Implements multi-stage build optimizations.
- Applies best Docker container practices and performance improvements.
- Triggered by phrases like "生成Dockerfile", "docker配置", and "containerize".
元数据
常见问题
Dockerfile Generator 是什么?
Automatically generate optimized Dockerfiles for various app types with multi-stage builds and best practice performance enhancements. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 641 次。
如何安装 Dockerfile Generator?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install dockerfile-generator」即可一键安装,无需额外配置。
Dockerfile Generator 是免费的吗?
是的,Dockerfile Generator 完全免费(开源免费),可自由下载、安装和使用。
Dockerfile Generator 支持哪些平台?
Dockerfile Generator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Dockerfile Generator?
由 HonestQiao(@honestqiao)开发并维护,当前版本 v1.0.0。
推荐 Skills