Install
openclaw skills install dockerfile-generatorAutomatically generate optimized Dockerfiles for various app types with multi-stage builds and best practice performance enhancements.
openclaw skills install dockerfile-generator根据应用类型自动生成优化的 Dockerfile。
# 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"]