Prompt #26 of 30

DevOps & Deployment

Claude Code Dockerfile Hardening prompt

Shrink the image, drop root, pin versions, surface vuln scan results.

When to use this prompt: Shrink the image, drop root, pin versions, surface vuln scan results. Drop it into Claude Code (or paste at the top of a claude.ai conversation) when you hit the exact moment described — the template is structured so Claude returns a focused, scannable answer, not a wall of text.

What this prompt does

Prompt structure (preview)

The actual prompt body (with the exact phrasing that makes Claude return cleanly) is in the Power Prompts PDF. The shape looks like this:

# Dockerfile Hardening — Power Prompt #26

ROLE: [role framing — full text in PDF]
INPUT: [what you paste in]
CONSTRAINTS:
  - [constraint 1 — keeps output focused]
  - [constraint 2 — output shape]
  - [constraint 3 — what Claude must NOT do]
OUTPUT FORMAT: [bullets / table / diff — exact spec in PDF]
TIP: [battle-tested usage note — what to do when output is weak]

How to use it (3 steps)

  1. Open the Power Prompts PDF, copy the prompt body for Dockerfile Hardening.
  2. Fill in the [BRACKETS] with your code, error, or context.
  3. Paste into Claude Code or claude.ai — or save in CLAUDE.md so Claude auto-loads it every session.

Get the actual prompt body

30 copy-paste templates including Dockerfile Hardening — 8-page PDF, paste into CLAUDE.md at your project root.

Launch 50p → Standard 50p → Pay what you can 30p+ →

Other prompts in DevOps & Deployment

Free first?

The free-prompts page has 5 full prompt bodies (CC0) so you can verify format and quality before paying. Or scan all 30 prompts by name.

← #25 Hook-First README #27 GitHub Actions CI/CD →

FAQ

Is the full Dockerfile Hardening prompt body free or paid?
It's part of the paid Power Prompts PDF (50p). Five other prompts are free on the free-prompts page — same format, so you can verify quality first.
Can I get a refund if Dockerfile Hardening doesn't work for my workflow?
Yes — 7-day refund, no questions asked. Reply to the Stripe receipt email.
Will this work in claude.ai too, or only Claude Code?
Both. Every prompt is plain text — works in claude.ai, the Anthropic API, Claude Code, or any other Claude interface. The CLAUDE.md auto-load is Claude-Code-specific but optional.
How is this different from prompts I'd write myself?
The bracket-template structure (ROLE / INPUT / CONSTRAINTS / OUTPUT FORMAT / TIP) is the result of 50+ iterations across real codebases. Each prompt has a TIP block with what to do when Claude's first answer is weak — that's the part that takes hours to discover yourself.