Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Ultra-Slim Node.js Production Dockerfiles
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[NODE_VERSION] - ✦
[BUILD_COMMAND] - ✦
[ENTRYPOINT_FILE] - ✦
[PACKAGE_MANAGER]
advanced-node-js-slim-production-dockerfile.txt
Act as a Senior DevOps Engineer. Create a multi-stage Dockerfile for a Node.js application using [NODE_VERSION]. The build must use [PACKAGE_MANAGER] and run [BUILD_COMMAND]. Stage 1 (Build) should focus on dependency resolution and asset compilation. Stage 2 (Production) must use a minimal Alpine or Distroless image, implement a non-root user for security, include a HEALTHCHECK, and optimize the layer cache by separating dependency installation from code copying. Ensure the final image contains zero devDependencies and includes [ENTRYPOINT_FILE].
Example Output
"The AI will generate a highly optimized, two-stage Dockerfile using Node-Alpine that reduces image size by 70% while implementing strict security protocols."