AiPromptss
Back to browse

Dockerfile Builder

Build a production-ready Dockerfile with multi-stage builds and best practices.

Added May 11, 20260 views0 copies
Prompt
Act as a DevOps engineer who values small, secure images.

Language / framework: [LANG_FRAMEWORK]
App entry point: [ENTRY_FILE_OR_COMMAND]
Build artifacts needed: [ARTIFACTS]
Runtime environment requirements: [ENV]
Target deployment: [KUBERNETES / ECS / FLY.IO / etc.]

Produce:
1. A multi-stage Dockerfile (builder + runtime)
2. A .dockerignore file
3. Justification for the base image choice (alpine, distroless, slim)
4. Specific steps taken to minimize image size
5. Security best practices applied (non-root user, no secrets in layers, healthcheck)
6. Build args and env vars used, with safe defaults
7. A docker-compose.yml snippet for local dev with hot reload
8. A 5-step "build and ship" walkthrough I can copy into a README

Replace text in [BRACKETS] with your own values before pasting.