docker-expert

Enforces Docker and Compose house rules for PHP-Swoole services.

2|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/abnegate/claudes --skill docker-expert-abnegate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-expert
Source: https://github.com/abnegate/claudes/tree/main/skills/docker-expert
Command: npx skills add https://github.com/abnegate/claudes --skill docker-expert-abnegate

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about docker-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Docker healthchecks to prevent startup race conditions in PHP Swoole containers?

Docker healthchecks prevent startup race conditions by gating Compose depends_on dependencies, ensuring PHP Swoole containers wait for required services to be fully ready. This avoids hidden deadlocks and startup flakiness.

What opcache settings are needed for long-running PHP Swoole workloads?

Long-running PHP Swoole workloads require tuned opcache settings including preload, JIT configuration, and timestamp validation strategy to match Swoole worker lifecycles and prevent memory exhaustion. These settings ensure stable persistent process performance.

Why does my PHP Swoole Docker container fail to shut down gracefully?

PHP Swoole containers fail to shut down gracefully when lacking correct PID 1 signal handling. Using tini for PID 1 management and configuring graceful shutdown timing ensures Swoole workers terminate cleanly without truncating active requests.

How do I use multi-stage Docker builds to copy compiled PHP extensions correctly?

Multi-stage Docker builds copy compiled PHP extensions and required shared libraries reliably from builder stages, avoiding brittle single-file approaches. Using BuildKit ensures proper artifact copying for Swoole-ready images without missing runtime dependencies.

What are common Docker Compose anti-patterns that cause Swoole container OOM or fd starvation?

Common Docker Compose anti-patterns causing Swoole OOM or fd starvation include missing resource budgeting and incorrect dependency gating. Setting Swoole-relevant memory and file descriptor limits explicitly prevents these runtime crashes.