Generate Docker Compose and Dockerfile configurations for local development through interactive Q&A. Supports PHP/Laravel, WordPress, Drupal, Joomla, Node.js, and Python stacks with Nginx, Supervisor/PM2, databases, Redis, and email testing. Always asks clarifying questions before generating configurations.
Run this skill in the main conversation. Do not spawn subagents, agent teams, or delegated parallel workers unless the user explicitly approves the proposed count and scope after being told that doing so can increase usage. Ask again before expanding an approved scope.
name: and role-based service names. Do not set container_name by default because it prevents service scaling and creates cross-project collisions.latest tags in generated files.127.0.0.1 by default; keep databases, caches, SMTP, PHP-FPM, and internal APIs unexposed when possible.Check Docker and Compose capabilities before selecting syntax:
docker version
docker compose version
Inspect, when present:
compose.yaml, compose.yml, docker-compose*.yml, and override filesDockerfile*, .dockerignore, .devcontainer/, Makefiles, and package scriptsRun stack detection from this skill directory, passing the project root:
./scripts/detect-stack.sh "<project-root>"
The script emits JSON on stdout and diagnostics on stderr. Confirm uncertain findings from source files without printing secret values.
When Docker is available, optionally inspect local images and networks:
./scripts/detect-images.sh
./scripts/detect-network.sh
Do not let cached images or a detected network override project compatibility or isolation requirements.
Infer and summarize:
.localhost hostnames, same-origin /api routing, and required host exposureAsk for confirmation only where evidence is absent or conflicting. Typical high-impact questions are the apps to run, database parity, reverse-proxy integration, externally reachable ports, and whether an existing stack may be restructured.
| Need | Read |
|---|---|
| Detection rules and monorepo discovery | references/tech-stack-detection.md |
| Images, processes, dependencies, mounts, environment, Dockerfiles | references/service-configuration-guide.md |
| WordPress, Drupal, or Joomla | references/cms-configuration-guide.md |
| Ports, proxies, domains, networks, host access | references/networking-ports-guide.md |
| Existing Compose or Dockerfile changes | references/merge-backup-strategy.md |
| Readiness checks and smoke tests | references/health-check-patterns.md |
Use assets as starting points, not immutable output. Remove unselected services and adapt placeholders, healthchecks, commands, paths, users, and versions to the detected project.
Before writing, present:
After approval where required, generate the smallest coherent setup:
.dockerignorecompose.yaml without the obsolete top-level versionPrefer:
sync, sync+restart, or rebuild rules for large trees, native dependencies, or projects that benefit from granular syncDo not automatically run migrations, seeds, CMS installers, destructive cleanup, or database write tests.
Run static checks first:
docker compose config --quiet
docker build --check .
Use docker build --check only when the installed Docker version supports it. Then build and start after the user has approved container execution:
docker compose build
docker compose up -d --wait
docker compose ps -a
If --wait is unavailable, start detached and poll declared healthchecks with a bounded timeout. Inspect logs for failed or restarting services.
Run the bundled checks when applicable:
./scripts/health-check.sh
./scripts/db-test.sh # connection/read-only query
./scripts/db-test.sh --crud # explicit temporary-table CRUD check
Also run a stack-specific smoke check such as php artisan about, wp core version, drush status, python manage.py check, or the application's health endpoint. Verify hot reload by changing a harmless source file only when the user authorized runtime testing.
Report:
Never include secret values in the report.
Persistent host-port tracking is optional. First check:
PORT_REGISTRY_FILE="${DOCKER_LOCAL_DEV_PORT_REGISTRY:-${XDG_STATE_HOME:-$HOME/.local/state}/docker-local-dev/HOST_PORT_REGISTRY.md}"
test -f "$PORT_REGISTRY_FILE" && sed -n '1,220p' "$PORT_REGISTRY_FILE"
Before creating or refreshing the registry, explain the exact output path and scan root and obtain confirmation because the report may contain local project names and paths. Then run:
node ./scripts/scan-host-ports.mjs --root "<approved-root>" --out "$PORT_REGISTRY_FILE" --yes
Treat registered ports as reserved even when no process is currently listening. For a single project without a registry, a live port check is sufficient.
localhost.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