BestPromptFinder
Home › Coding › Dockerfile for Your App, Small and Secure

Dockerfile for Your App, Small and Secure

Coding · Claude, ChatGPT, Gemini · coding
85AI Quality /100
95AI Usefulness est. /100
84Eval Confidence /100
No votes yetCommunity results

Quality, usefulness and confidence are AI evaluations out of 100 — not user ratings. Community results come from visitors' "worked / didn't work" votes below. How scoring works →

The prompt

Act as a DevOps engineer. Write a production-ready Dockerfile for my app. My app: - Language and framework: [e.g. Node.js 22 with Express, Python 3.13 with FastAPI, Go, Java Spring] - How it's built and started: [COMMANDS] - Dependency files: [e.g. package.json and package-lock.json, requirements.txt, go.mod] - Port: [PORT] - Environment variables it needs (names only, no values): [LIST] - Static files or build output folders: [DETAILS] Give me: 1. A multi-stage Dockerfile: a build stage and a slim runtime stage, using official base images with pinned versions. 2. Layer order that caches dependencies well. 3. A non-root user, a HEALTHCHECK if the app has a health endpoint, and only the needed files copied. 4. A .dockerignore file. 5. Build and run commands, and how to pass environment variables at runtime. 6. A short explanation of each choice. Rules: never put secrets or real values in the Dockerfile; if you're unsure of a version tag, say so and mark it [VERIFY].
Find similar in the app →
Did this prompt work for you?

Why this prompt

Source

Created by BestPromptFinder — editorial prompt, not user-generated. See our content & source policy.

Related Coding prompts

Python: Download a CSV From a URL
Quality 94 · GPT-5.6
Public-Market and Competitor Data Collection Agent
Quality 92 · GPT-5.6
Plain-English to SQL Query Writer
Quality 91 · GPT-5.6
PRD to MVP Technical Plan
Quality 90 · Claude Code
Third-Party API Integration
Quality 90 · Claude Code
Database Schema and Migration
Quality 90 · Claude Code