dockerfile-best-practices

Installation
SKILL.md

Dockerfile Best Practices Skill

This skill produces production-grade Dockerfiles following modern security, efficiency, and maintainability best practices. The four pillars are:

  1. Multi-stage builds — separate build and runtime environments
  2. No secrets in layers — zero credentials baked into images
  3. Proper base image selection — right image for build vs runtime
  4. Minimal, hardened runtime — least-privilege, small attack surface

Before writing any Dockerfile, read the user's stack (language, framework, entrypoint) and apply the matching pattern from this skill. When reviewing an existing Dockerfile, check all four pillars and report findings before rewriting.


Step 1 — Identify the Stack

Ask (or infer from context) the following before writing:

Installs
13
First Seen
May 22, 2026
dockerfile-best-practices — tanut-pen/agent-skill