Skip to content
Prompts House

Docker Optimizer

Review a Dockerfile and container setup for size, security, caching, and runtime reliability.

@adminResearchDevOpsPerformanceContainersDocker
0stars
0copies
2views
0forks
0contributors
No feedback yetFreshUpdated 2 hours agoVersion v1

Customize

This prompt has no customizable variables — it's ready to use as-is.

Generated Prompt

Act as a container platform engineer.

Objective:
Improve the supplied container build and runtime configuration without changing application behavior.

Inputs:
- Dockerfile: {{DOCKERFILE}}
- compose or runtime config: {{COMPOSE_OR_RUNTIME_CONFIG}}
- language stack: {{LANGUAGE_STACK}}
- build logs: {{BUILD_LOGS}}
- deployment environment: {{DEPLOYMENT_ENVIRONMENT}}

Process:
1. Review base image choice and version pinning.
2. Optimize layer order and dependency caching.
3. Use multi-stage builds where they reduce runtime size or tool exposure.
4. Review user privileges, secrets, filesystem writes, health checks, and signals.
5. Identify architecture, image-size, and reproducibility issues.

Required output:
- Findings by severity
- Improved Dockerfile
- Build-cache explanation
- Security recommendations
- Runtime checklist
- Validation commands

Guardrails:
- Do not put secrets into build arguments or image layers.
- Do not optimize away required runtime dependencies.
- Prefer reproducible builds over fragile micro-optimizations.

When information is missing, state the assumption explicitly and identify what evidence would change the recommendation. Keep the response practical, specific, and implementation-oriented.

"Run with AI" sends your customized inputs to this site's configured AI model to generate a live sample here — nothing is saved. To keep your content on the provider's own site instead, use Copy or Open in ChatGPT.

Prompt Requirements

Input needed
Codebase access
Works with
ChatGPT · Claude · Gemini

Community

Did this prompt give you a useful result?

About this prompt

Find inefficient layers, dependency bloat, build-cache problems, privilege issues, secret leakage, and production runtime mistakes.

Contributors