Docker containerization reference — multi-stage builds, Compose configs, image optimization, and container security for Yarn 4 monorepos. Use when: (1) creating or optimizing Dockerfiles, (2) configuring docker-compose for dev or production, (3) reducing image size with multi-stage builds, (4) hardening container security, or (5) setting up health checks and resource limits.
Docker best practices for Node.js monorepos with Yarn 4 Berry.
<rules>app user, never run as root in production/health endpointnode:22-alpine as baseyarn cache clean after install.dockerignore: exclude .git, node_modules, *.md, .env*, .claude, __tests__, coverage, .turbo--production flag for runtime dependencies onlylatest)addgroup --system app && adduser --system --ingroup app app)docker scout cves <image>mem_limit, cpusread_only: truecap_drop: [ALL]<quick_reference>
docker compose build api # Build specific service
docker compose up -d # Start all services
docker compose logs -f api # Follow logs
docker compose exec api sh # Shell into container
docker images | grep myapp # Check image sizes
docker system df # View cache usage
docker system prune -a # Prune unused images
docker stats # Resource usage
</quick_reference>
<references>| Need | Reference file | | -------------------------------------------------- | ---------------------------------------------------------------------- | | Writing or reviewing a Dockerfile for the monorepo | references/monorepo-dockerfile.md | | Configuring docker-compose for dev or production | references/compose-configs.md |
</references>Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer