Sign inSign up

gagalkoding/lamp

By gagalkoding

•Updated 5 months ago

Multi-PHP runtime Docker LAMP Stack platform with PHP 5.6, 7.4, 8.5, Apache, MariaDB & ionCube.

Image
Web servers
6

3.5K

gagalkoding/lamp repository overview

Docker-LAMP

Docker-LAMP v2 is a modern multi-runtime PHP platform built with Docker, Apache, PHP-FPM, MariaDB, and phpMyAdmin.

Docker Hub License

Designed for:

  • Laravel
  • CodeIgniter
  • WordPress
  • WHMCS
  • Legacy PHP applications
  • Migration testing
  • Multi-version PHP development
  • Production-compatible deployments

Supports:

  • PHP 5.6
  • PHP 7.4
  • PHP 8.5
  • Apache 2.4
  • MariaDB 11
  • phpMyAdmin
  • ionCube Loader
  • ARM64 + AMD64
  • Apple Silicon
  • Linux servers
  • Windows + Docker Desktop

⁠Introduction

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:

  • Apache + PHP-FPM
  • Separate isolated PHP runtime containers
  • MariaDB container
  • phpMyAdmin container
  • Docker Compose orchestration
  • ionCube support
  • ARM64 + AMD64 compatibility

Docker-LAMP v2 supports:

  • PHP 5.6
  • PHP 7.4
  • PHP 8.5
  • Apple Silicon
  • Linux servers
  • Windows + Docker Desktop

The platform is designed for development, migration testing, legacy modernization, and production-compatible PHP deployments.

⁠Image Versions

The table below shows the runtime versions included with Docker-LAMP v2.

Component2.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.

⁠Quick Start

Clone repository:

git clone https://github.com/GagalKoding/docker-lamp.git && cd docker-lamp
⁠Using prebuilt Docker Hub images

Recommended for most users.

docker compose -f compose/docker-compose.hub.yml up -d
⁠Building locally

Build

docker compose -f compose/docker-compose.yml build --no-cache

Run it

docker compose -f compose/docker-compose.yml up -d
⁠Open in browser

Application:

http://localhost

phpMyAdmin:

http://localhost:8080
⁠Change PHP Version

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.

⁠Contributing

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.

  1. Clone/fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')\
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

⁠License

Docker-LAMP is licensed under the Apache 2.0 License⁠.

Tag summary

Content type

Image

Digest

sha256:ebcc2c832…

Size

255.4 MB

Last updated

5 months ago

docker pull gagalkoding/lamp:latest-php74