@tank/docker-production-patterns

Installation
SKILL.md

Docker Production Patterns

Core Philosophy

  1. Ship the minimum viable image — Every unnecessary binary, library, and shell in the final image is attack surface and wasted bandwidth. Multi-stage builds exist to separate build-time from run-time.
  2. Layers are the caching unit — Order instructions from least-changing (base image, system deps) to most-changing (application code). A single misordered COPY invalidates every subsequent layer.
  3. Containers are ephemeral — Design for termination. Handle SIGTERM, drain connections, flush buffers. If your container cannot stop cleanly in 10 seconds, the architecture is wrong.
  4. Security is not optional — Run as non-root, use read-only filesystems, scan images in CI, never bake secrets into layers. The default Docker setup is insecure for production.
  5. Compose is not just for dev — With profiles, resource limits, health checks, and secrets, Compose serves single-host production. Know when to graduate to orchestrators.

Quick-Start: Common Problems

"My Docker image is too large"

Installs
–
GitHub Stars
1
First Seen
–
@tank/docker-production-patterns — tankpkg/packages