Skip to main content
7BBusyBoss

Production Dockerfile

Generates a multi-stage, small-image Dockerfile for a given stack.

Multi-stage build, non-root user, .dockerignore, healthcheck, cache layers.

DevOps & SREdockerdeploy

The prompt

Copy this into ChatGPT, Claude, Gemini or any assistant you already use β€” then paste your own stack description underneath it.

Generate a production-grade Dockerfile for the stack described. Output:

**Dockerfile** (multi-stage)
**.dockerignore**
**1-line explanation per stage**

Rules:
- Use multi-stage builds.
- Run as non-root.
- Cache dependency install separately from source copy.
- Pin base images by version, not :latest.
- Add a HEALTHCHECK if appropriate for the runtime.

Example input

Node.js 20, Next.js 16, pnpm, runs on port 3000, deployed on Vercel-style platforms.

Or run it here

84/8000
Output will appear here after you click Run.
Or run in your favourite chatbot

Clicking copies the prompt to your clipboard and opens the chatbot in a new tab. Gemini doesn't accept URL params β€” paste manually with Ctrl/Cmd+V.

Browse the full free AI prompt library or see more devops & sre prompts.