docker
Installation
SKILL.md
Docker — Containerization for Monorepos
Docker best practices for Node.js monorepos with Yarn 4 Berry.
Key Principles
- Minimal images: Alpine-based, only runtime dependencies in final stage
- Layer caching order: system deps → package manifests → install → source → build
- Non-root users: Create
appuser, never run as root in production - One process per container: Compose multiple containers, not multiple processes
- Health checks on every service: Use the existing
/healthendpoint