react-dockerfile
Installation
SKILL.md
React Dockerfile Generator
Generate production-ready multi-stage Dockerfiles for React applications served with Nginx.
Workflow
- Determine build tool: Vite (default), Create React App, or Next.js static export
- Identify Node.js version from
.nvmrc,package.jsonengines, or use Node 22 LTS - Check for existing nginx configuration files
- Choose optimization: standard, non-root (recommended), or runtime env vars
Key Insight: Unlike server-side Node.js apps, React apps only need Node.js for building—the runtime is static files served by Nginx. This reduces image size from ~1GB to ~50MB.