适用于MAC M1(Apple Silicon)的LAMP栈(Apache2、MySQL和多版本PHP 5.6、7.4、8.0),基于Ubuntu 18.04系统,提供便捷的一体化开发环境,支持多种PHP项目和框架。
Docker-LAMP v2 is a modern multi-runtime PHP platform built with Docker, Apache, PHP-FPM, MariaDB, and phpMyAdmin.
https://hub.docker.com/r/gagalkoding/lamp
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.
| Component | 2.0 |
|---|---|
| http://www.apache.org/ | 2.4 |
| https://www.mysql.com/ | 11 |
| http://php.net/ | 5.6, 7.4, 8.5 |
| https://www.phpmyadmin.net/ | 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:
bashgit clone https://github.com/GagalKoding/docker-lamp.git && cd docker-lamp
Using prebuilt Docker Hub images
Recommended for most users.
bashdocker compose -f compose/docker-compose.hub.yml up -d
Building locally
Build
bashdocker compose -f compose/docker-compose.yml build --no-cache
Run it
bashdocker compose -f compose/docker-compose.yml up -d
Open in browser
Application:
texthttp://localhost
phpMyAdmin:
texthttp://localhost:8080
Change PHP Version
Create:
textapp/.htaccess
PHP 5.6:
apache<FilesMatch \.php$> SetHandler "proxy:fcgi://php56:9000" </FilesMatch>
PHP 7.4:
apache<FilesMatch \.php$> SetHandler "proxy:fcgi://php74:9000" </FilesMatch>
PHP 8.5:
apache<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.
- Clone/fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')\
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
License
Docker-LAMP is licensed under the Apache 2.0 License.
更多相关 Docker 镜像与资源
以下是 gagalkoding/lamp 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务