docker
Installation
SKILL.md
Non-negotiable rules:
- Read
references/stack.mdfirst to determine the project's base images, registry, and build conventions. - Then load only the references needed for the actual task.
- Multi-stage builds by default — separate dependency install, build, and production stages.
- Non-root user in production — never run containers as root. Add a user and
USERdirective. - No secrets in images — no
ARG/ENVfor passwords, noCOPY .env, no secrets in build layers. - Pin base image versions —
node:22-slim, notnode:latest. Use digest pinning for critical images. .dockerignoreis mandatory — excludenode_modules,.git,.env,dist, test artifacts.- Frozen lockfiles in builds —
--frozen-lockfile/--cifor reproducible installs.
docker
Inputs
$request: The Docker task — Dockerfile, Compose, registry, optimization, or debugging target
Related skills