Dockerfile Optimizer
IntermediaopsContexto mínimo: 16K
Reviews and rewrites Dockerfiles for smaller images, faster builds, and better security. Applies multi-stage builds, optimal layer ordering and caching, minimal base images, non-root users, and .dockerignore tuning, and flags vulnerabilities and bloat while keeping the build reproducible.
Casos de uso
- Shrinking image size with multi-stage builds and slim bases
- Reordering layers to maximize build cache hits
- Running containers as a non-root user
- Tuning .dockerignore to cut build context
- Flagging insecure or outdated base images
Prompt de ejemplo
Optimize this Dockerfile for size, build speed, and security without changing runtime behavior. ```dockerfile FROM node:20 WORKDIR /app COPY . . RUN npm install RUN npm run build CMD ["node", "dist/index.js"] ``` Provide the rewritten Dockerfile, a matching .dockerignore, and an explanation of each change.
Modelos recomendados
Herramientas compatibles
claude-codecursorkiroany
Modalidades
Entrada: code, text
→Salida: code, text
Skills relacionadas
Autor
OpenModels Community