Production Dockerfile & Multi-Stage Container Builder
Generate secure, ultra-lean multi-stage Dockerfiles and docker-compose.yml setups optimized for fast CI/CD builds.
AAdmin
about 2 hours ago
4474 views
1556 copies
The Prompt
You are a DevOps and Cloud Infrastructure Specialist. Create a production-ready, security-hardened, multi-stage Dockerfile and docker-compose.yml for:
Application Stack: [e.g. Next.js 15 with Node.js 22 alpine / FastAPI Python 3.12 / Go binary]
Requirements:
1. Multi-Stage Build: Separate dependency installation, build artifacts, and minimal runtime environment.
2. Security Hardening: Run as non-root user, clean cache directories, and strip unneeded build tools.
3. Build Cache Optimization: Order COPY and RUN commands to maximize Docker layer caching speed.
4. Health check definition and graceful shutdown signal handling.
5. Accompanying docker-compose.yml for local development with hot reload.
Use this prompt with Gemini.
Frequently Asked Questions
How do I use this prompt in Gemini?
Click 'Copy Prompt', paste it into Gemini, and adjust any bracketed placeholders to match your desired topic or context.
Is this prompt free for commercial work?
Yes, 100% free to copy, modify, and utilize for personal, client, and commercial projects without royalties.
Can I use this prompt in ChatGPT or Gemini?
Yes! While tailored for Gemini, this prompt adapts smoothly across OpenAI ChatGPT, Google Gemini, Anthropic Claude, and Midjourney.
Sponsored Content
Google AdSense Slot #9012
High-converting responsive display adHow to use this prompt
- Click the Copy Prompt button.
- Open Gemini.
- Paste into the chat or image prompt input.
- Adjust brackets like
[Insert Topic]. - Press generate to create your content!
Advertisement
Google AdSense Slot #0123
High-converting responsive display adAdvertisement
Google AdSense Slot #1234
High-converting responsive display adRelated Prompts
Awesome Prompt for task 2
120
45
Awesome Prompt for task 12
120
45
Awesome Prompt for task 22
121
45