Modern multi-runtime PHP infrastructure platform powered by Docker, Apache, PHP-FPM, MariaDB, PostgreSQL, Redis, Memcached, MongoDB extension support, and dynamic runtime switching.
Designed for developers, infrastructure engineers, operations teams, legacy migration, and multi-version PHP environments.
Supports:
- PHP 5.6
- PHP 7.4
- PHP 8.5
- Apache 2.4
- MariaDB 11
- PostgreSQL 17
- Redis
- Memcached
- MongoDB Extension
- phpMyAdmin
- pgAdmin
- ionCube Loader
- Apple Silicon / ARM64
- Intel / AMD64
Docker-LAMP Platform v2 is a modular multi-runtime PHP infrastructure platform designed for:
- modern PHP applications
- enterprise legacy systems
- migration testing
- multi-version PHP hosting
- operations-focused development
- containerized infrastructure
The platform allows multiple PHP runtimes to coexist simultaneously within a single Docker stack while supporting per-project runtime switching using .htaccess.
- Multi-runtime PHP architecture
- Dynamic PHP runtime switching
- Apache + PHP-FPM design
- MariaDB support
- PostgreSQL support
- Redis support
- Memcached support
- MongoDB extension support
- phpMyAdmin included
- pgAdmin included
- ionCube Loader support
- ARM64 / Apple Silicon support
- AMD64 / Intel support
- Multi-application hosting
- VirtualHost architecture
- Dynamic php.ini configuration
- Isolated runtime containers
- Production deployment ready
| Category | Technologies |
|---|---|
| Web Server | Apache 2.4 |
| PHP Runtime | PHP 5.6, 7.4, 8.5 |
| Database | MariaDB, PostgreSQL, SQLite |
| Cache | Redis, Memcached, APCu |
| Extensions | MongoDB, LDAP, IMAP, SOAP, ionCube |
| Administration | phpMyAdmin, pgAdmin |
| Architectures | ARM64, AMD64 |
| Container Runtime | Docker Compose |
Docker-LAMP Platform v2 is designed for:
- Laravel development
- CodeIgniter development
- WHMCS hosting
- WordPress hosting
- Enterprise legacy PHP systems
- Multi-version PHP hosting
- Migration testing
- Shared runtime infrastructure
- Apple Silicon PHP development
- Production containerized PHP infrastructure
Docker-LAMP Platform v2 uses a modular service-oriented architecture.
Internet
│
▼
Apache Container
├── PHP 5.6 FPM
├── PHP 7.4 FPM
├── PHP 8.5 FPM
├── MariaDB
├── PostgreSQL
├── Redis
├── Memcached
├── phpMyAdmin
└── pgAdmin
Each PHP runtime is fully isolated:
- PHP-FPM
- extensions
- ionCube
- Composer
- runtime configuration
- dependencies
This architecture enables:
- runtime isolation
- simplified upgrades
- compatibility testing
- stable legacy coexistence
- enterprise migration workflows
Docker-LAMP Platform v2 follows a layered infrastructure design:
- Apache reverse proxy layer
- Isolated PHP runtime containers
- Dedicated database services
- Shared Docker networking
- Dynamic
.htaccessruntime routing - Multi-runtime coexistence
- Multi-application hosting
| PHP Version | Status | Primary Usage |
|---|---|---|
| PHP 5.6 | Legacy | WHMCS, legacy CMS, migration |
| PHP 7.4 | Transitional | Laravel 6/7/8, migration |
| PHP 8.5 | Modern | Modern frameworks & applications |
- Docker
- Docker Compose
- Linux / macOS / Windows
- ARM64 or AMD64 CPU
.
├── app/
├── compose/
│ ├── docker-compose.yml
│ └── docker-compose.hub.yml
├── docker/
│ ├── apache/
│ ├── php56/
│ ├── php74/
│ └── php85/
└── docs/
Docker-LAMP Platform v2 supports two installation methods.
| Method | Recommended For |
|---|---|
| Docker Hub Images | Standard users |
| Local Build | Contributors & customization |
git clone https://github.com/GagalKoding/docker-lamp.git && cd docker-lampUses prebuilt images from Docker Hub.
No local build required.
docker compose -f compose/docker-compose.hub.yml up -dApplication:
http://localhost
phpMyAdmin:
http://localhost:8080
pgAdmin:
http://localhost:8081
Recommended for:
- contributors
- runtime customization
- infrastructure development
- extension customization
docker compose -f compose/docker-compose.yml build --no-cachedocker compose -f compose/docker-compose.yml up -dDocker-LAMP Platform v2 supports dynamic runtime switching using .htaccess.
This enables:
- per-project PHP versions
- migration testing
- legacy coexistence
- multi-runtime hosting
<FilesMatch \.php$>
SetHandler "proxy:fcgi://php85:9000"
</FilesMatch><FilesMatch \.php$>
SetHandler "proxy:fcgi://php74:9000"
</FilesMatch><FilesMatch \.php$>
SetHandler "proxy:fcgi://php56:9000"
</FilesMatch>No rebuild required.
Refresh browser after changing .htaccess.
Docker-LAMP Platform v2 supports hosting multiple applications simultaneously.
Example:
| Domain | PHP Runtime |
|---|---|
| crm.example.com | PHP 8.5 |
| billing.example.com | PHP 7.4 |
| legacy.example.com | PHP 5.6 |
Applications can coexist within the same infrastructure stack while using isolated runtimes.
<VirtualHost *:80>
ServerName crm.example.com
DocumentRoot /var/www/html/crm/public
<Directory /var/www/html/crm/public>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/crm-error.log
CustomLog ${APACHE_LOG_DIR}/crm-access.log combined
</VirtualHost>Host:
db
Port:
3306
Default Credentials:
| Key | Value |
|---|---|
| Username | root |
| Password | root |
| Database | app |
Host:
postgres
Port:
5432
Default Credentials:
| Key | Value |
|---|---|
| Username | root |
| Password | root |
| Database | app |
Host:
redis
Port:
6379
Host:
memcached
Port:
11211
URL:
http://localhost:8080
URL:
http://localhost:8081
Default Credentials:
| Key | Value |
|---|---|
| admin@example.com | |
| Password | root |
<?php
$db = new PDO(
'mysql:host=db;dbname=app',
'root',
'root'
);<?php
$db = new PDO(
'pgsql:host=postgres;dbname=app',
'root',
'root'
);Docker-LAMP Platform v2 includes support for:
- ionCube Loader
- Redis
- Memcached
- MongoDB
- APCu
- PostgreSQL
- SQLite
- LDAP
- IMAP
- SOAP
- Imagick
- XSL
- Tidy
- FTP
- Sockets
Docker-LAMP Platform v2 includes ionCube support for:
- PHP 5.6
- PHP 7.4
- PHP 8.5
Ideal for:
- WHMCS
- encoded commercial applications
- enterprise legacy software
Each PHP runtime supports dynamic php.ini configuration.
Example:
docker/php85/php.ini
docker/php74/php.ini
docker/php56/php.ini
No rebuild required after changing runtime settings.
Example settings:
memory_limit = 512M
upload_max_filesize = 128M
post_max_size = 128M
date.timezone = Asia/JakartaDocker-LAMP Platform v2 fully supports:
- Apple Silicon M1
- Apple Silicon M2
- ARM64
- AMD64 / Intel
No Rosetta required.
Supports Docker multi-architecture images.
Typical operations workflow:
- deploy stack
- configure VirtualHosts
- assign PHP runtime per application
- configure databases
- manage runtime isolation
- monitor container health
- scale infrastructure services
- update runtimes independently
Typical developer workflow:
- clone repository
- start stack
- create project
- assign PHP runtime
- develop locally
- test migrations
- switch runtimes dynamically
- deploy consistently
| Service | Container |
|---|---|
| Apache | docker-lamp-apache |
| PHP 5.6 | docker-lamp-php56 |
| PHP 7.4 | docker-lamp-php74 |
| PHP 8.5 | docker-lamp-php85 |
| MariaDB | docker-lamp-db |
| PostgreSQL | docker-lamp-postgres |
| Redis | docker-lamp-redis |
| Memcached | docker-lamp-memcached |
| phpMyAdmin | docker-lamp-pma |
| pgAdmin | docker-lamp-pgadmin |
docker compose -f compose/docker-compose.yml up -ddocker compose -f compose/docker-compose.yml downdocker compose -f compose/docker-compose.yml build --no-cachedocker compose -f compose/docker-compose.yml down -vdocker psdocker compose logs -fRecommended production practices:
- use reverse proxy
- configure HTTPS
- restrict exposed ports
- isolate production secrets
- use environment variables
- avoid default credentials
- enable backups
- monitor container health
Planned future improvements:
- Traefik integration
- automatic SSL
- environment templates
- health monitoring
- queue worker containers
- scheduler containers
- backup automation
- metrics & observability
- production deployment templates
Pull requests are welcome.
- Fork repository
- Create feature branch
- Commit changes
- Push branch
- Open pull request
Apache License 2.0