Multi-PHP runtime Docker LAMP Stack platform with PHP 5.6, 7.4, 8.5, Apache, MariaDB & ionCube.
3.5K
Docker-LAMP v2 is a modern multi-runtime PHP platform built with Docker, Apache, PHP-FPM, MariaDB, and phpMyAdmin.
Designed for:
Supports:
As a developer, part of my day to day role is building and maintaining PHP applications across multiple PHP versions. Modern projects may require PHP 8.x, while many legacy platforms such as WHMCS, old Laravel applications, CodeIgniter projects, and older CMS systems still depend on PHP 5.6 or PHP 7.4.
Docker-LAMP v2 was built to solve this problem using a modern multi-container Docker architecture with isolated PHP runtimes.
Designed to provide a simple interface that 'gets out of your way', Docker-LAMP v2 supports modern and legacy PHP applications side-by-side with dynamic runtime switching using .htaccess.
Unlike the v1 monolithic Ubuntu 18.04 architecture, Docker-LAMP v2 now uses:
Docker-LAMP v2 supports:
The platform is designed for development, migration testing, legacy modernization, and production-compatible PHP deployments.
The table below shows the runtime versions included with Docker-LAMP v2.
| Component | 2.0 |
|---|---|
| Apache | 2.4 |
| MariaDB | 11 |
| PHP | 5.6, 7.4, 8.5 |
| phpMyAdmin | latest |
| ionCube | supported |
Docker-LAMP v2 now uses a modular multi-container architecture with isolated PHP runtime containers for each supported PHP version.
Clone repository:
git clone https://github.com/GagalKoding/docker-lamp.git && cd docker-lamp
Recommended for most users.
docker compose -f compose/docker-compose.hub.yml up -d
Build
docker compose -f compose/docker-compose.yml build --no-cache
Run it
docker compose -f compose/docker-compose.yml up -d
Application:
http://localhost
phpMyAdmin:
http://localhost:8080
Create:
app/.htaccess
PHP 5.6:
<FilesMatch \.php$>
SetHandler "proxy:fcgi://php56:9000"
</FilesMatch>
PHP 7.4:
<FilesMatch \.php$>
SetHandler "proxy:fcgi://php74:9000"
</FilesMatch>
PHP 8.5:
<FilesMatch \.php$>
SetHandler "proxy:fcgi://php85:9000"
</FilesMatch>
No rebuild required.
Refresh browser after changing .htaccess.
If you wish to submit a bug fix or feature, you can create a pull request and it will be merged pending a code review.
Docker-LAMP is licensed under the Apache 2.0 License.
Content type
Image
Digest
sha256:ebcc2c832…
Size
255.4 MB
Last updated
5 months ago
docker pull gagalkoding/lamp:latest-php74