What problem does it solve?
This Skill prevents slow, flaky, or wasteful Docker and Compose setups for PHP+Swoole services by standardizing the non-obvious house rules and container-runtime behaviors that matter in production.
Core Features & Use Cases
- Swoole-specific PHP multi-stage builds: Copy compiled PHP extensions and needed shared libraries reliably (not brittle single-file approaches).
- Long-running runtime tuning: Apply PHP ini and opcache settings optimized for Swoole worker lifecycles, including preload/JIT and timestamp validation strategy.
- Correct container lifecycle & readiness: Use PID 1 handling (tini), graceful shutdown timing, and healthchecks plus Compose healthcheck-gated dependencies to avoid startup races and hidden deadlocks.
- Resource budgeting & anti-pattern avoidance: Set Swoole-relevant memory and fd limits and explicitly refuse common mistakes that lead to OOMs, fd starvation, or race conditions.
Quick Start
Ask an AI to review your Dockerfile and docker-compose.yml for a PHP 8.3 + Swoole 6 service and enforce the docker-expert house rules for multi-stage builds, healthchecks, opcache/ini tuning, graceful shutdown, and Compose depends_on health gating.