How incomestreamsurfer/wordpress-docker-claude-code works
Project Type and Purpose
• This is a Docker-based full-stack development environment combining:
• VS Code Server (web IDE)
• Claude Code CLI (AI coding assistant)
• WordPress (PHP/Apache CMS)
• MySQL 8.0 (database)
• phpMyAdmin (DB GUI)
• Supports multi-instance isolation via port-offsets and provides remote access via browser.
Main Components
a. Docker Host & Orchestration
• Docker Engine runs on the developer’s machine
• docker-compose.yml defines service graph and shared network
b. Containers
1) devenv (Ubuntu 22.04 base)
• VS Code Server on port 8080 (+offset)
• Apache+PHP serving WordPress on port 8000 (+offset)
• Claude Code CLI calls out to Anthropic API
• Developer’s home directory volumes: /home/developer/wordpress → host wordpress/
2) db (MySQL 8.0)
• Exposed port 13306 (internal 3306)
• Config files mounted from config/mysql/my.cnf
3) phpmyadmin
• Web UI on port 8081 (+offset)
• Connects to db service via Docker network
c. Host File System Volumes
• wordpress/ directory mounted into devenv for immediate sync
• config/ directory for code-server, PHP, MySQL, and WP settings
• scripts/ for bootstrap (install-claude-code.sh, setup.sh)
d. External Services
• Anthropic API endpoint (https://api.anthropic.com) used by Claude CLI
• Browser client (Chrome/Firefox) on developer machine
Component Relationships & Data Flows
• Browser → devenv:
• HTTP 8080 → VS Code Server
• HTTP 8000 → Apache-PHP → WordPress
• Browser → phpMyAdmin: HTTP 8081 → phpMyAdmin UI
• devenv ↔ db: MySQL protocol (3306) over Docker network
• phpMyAdmin ↔ db: MySQL protocol (3306) over Docker network
• devenv → Anthropic API: HTTPS calls for Claude Code
• docker-compose manages ephemeral network connecting all containers
Architectural Patterns & Principles
• Containerization: one service per container, clear separation of concerns
• Volume mounting: code hot-reload and config injection
• Port-offset multi-instance: parameterized via setup.sh and instance ID
• Environment encapsulation: all dev tools (GitHub CLI, Docker CLI, Xdebug) co-located in devenv