This Coder template creates a comprehensive PHP development environment with multiple PHP versions and supporting services, based on the vscode-remote-environment devcontainer.
- Multiple PHP Versions: 7.3, 7.4, 8.0, 8.2, 8.4 with PHP-FPM
- Web Server: Nginx with version-specific virtual hosts
- Database: MariaDB with persistent storage
- Development Tools:
- Xdebug for debugging (port 9003)
- PHP debugging extensions pre-installed
- IBM DB2 client libraries and PHP extensions
- VS Code Integration:
- Web-based VS Code (code-server)
- Pre-configured with PHP development extensions
- IntelliSense and debugging support
Each PHP version runs on its own dedicated port:
- 8073: PHP 7.3 Web Server
- 8074: PHP 7.4 Web Server
- 8080: PHP 8.0 Web Server
- 8082: PHP 8.2 Web Server
- 8084: PHP 8.4 Web Server
- 3306: MariaDB Database
- 9003: Xdebug Port
- 13337: VS Code Server
- Create a new workspace using this template
- Configure CPU cores (1-8) and memory (2-16 GB) as needed
- Wait for the environment to build (first time may take 5-10 minutes)
- Access your development environment through the VS Code app
- VS Code: Use the "VS Code" app in your Coder dashboard
- PHP Servers: Use the respective PHP version apps (PHP 7.3, PHP 8.0, etc.)
- Files: Your code is persisted in
/workspacesand available across restarts
- Clone your repositories into
/workspaces - Edit code using the integrated VS Code
- Test on different PHP versions using the respective server apps
- Debug using Xdebug on port 9003
- Access MariaDB on port 3306 for database operations
Default MariaDB credentials:
- Host:
localhost(ormariadbfrom within containers) - Port:
3306 - Root Password:
Novigo2025!! - Database:
my_database - User:
db_user - Password:
Novigo2025!!
The environment comes pre-configured with essential PHP development extensions:
- PHP Debug (
felixfbecker.php-debug) - Xdebug integration - PHP Intelephense (
bmewburn.vscode-intelephense-client) - IntelliSense and code navigation - PHP Tools (
DEVSENSE.phptools-vscode) - Advanced PHP development features
The environment includes IBM DB2 client libraries and PHP extensions:
- ibm_db2 PHP extension
- pdo_ibm PHP extension
- Client libraries located at
/opt/ibm/clidriver
This template uses Docker-in-Docker with the following architecture:
- Main Container: Runs envbuilder to set up the devcontainer environment
- Multi-Container Setup: Nginx + multiple PHP-FPM containers + MariaDB
- Persistent Storage: Workspace files and database data persist across restarts
- Network Isolation: Each workspace gets its own Docker network
- Minimum: 2 CPU cores, 2 GB RAM
- Recommended: 4 CPU cores, 4 GB RAM
- For heavy development: 6-8 CPU cores, 8-16 GB RAM
If PHP servers aren't accessible:
- Check the workspace logs in Coder
- Verify the docker-compose services are running:
docker-compose ps - Restart the workspace if needed
- Ensure MariaDB container is running
- Check network connectivity between containers
- Verify credentials match the environment variables
- Increase CPU/memory allocation in template parameters
- Check if all PHP versions are needed (consider commenting out unused ones)
- Monitor resource usage in Coder dashboard
Edit .devcontainer/Dockerfile to add additional PHP extensions:
RUN apt-get install -y php8.0-your-extensionEdit the respective php.ini files in .devcontainer/conf/phpXX/
Modify virtual host configurations in .devcontainer/conf/nginx/conf.d/
This template is based on the open-source vscode-remote-environment repository. For issues specific to the PHP environment setup, refer to that repository's documentation.
For Coder-specific issues, check the Coder documentation or contact your Coder administrator.