Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for Node.js Next.js Standalone Deployment

Use this engineered prompt to drastically optimize your workflow and output.

Required Variables

  • [NEXT_CONFIG_FILE]
  • [PUBLIC_ASSETS_DIR]
  • [SHARP_VERSION]
nextjs-standalone-docker-optimization.txt
You are a Frontend Infrastructure Engineer. Create a multi-stage Dockerfile optimized for Next.js 13/14+ 'standalone' output. Stage 1: Install and Build. Stage 2: Selective copy of .next/standalone, .next/static, and public folder. Ensure 'sharp' (version [SHARP_VERSION]) is correctly handled for image optimization. The final image should be the absolute minimum size required to run the Next.js server, excluding all source code and development tools.

Example Output

"A specialized Dockerfile that reduces Next.js image sizes from 1GB+ down to ~100MB by utilizing the standalone output feature."