A complete LAMP stack running in Docker with PHP 8.4, MySQL/MariaDB, phpMyAdmin, and MailHog for email testing.
- imagick
- pdo_mysql
- pdo_sqlite
- bcmath
- mysqli
- curl
- zip
- mbstring
- gettext
- calendar
- exif
- soap
- freetype
- poppler-utils (PDF -> PNG)
- Apache 2
- MySQL or MariaDB (latest)
- phpMyAdmin
- MailHog (captures outgoing emails)
- Persistent volumes for data and logs
MailHog captures all outgoing emails inside Docker.
$mail->isSMTP();
$mail->Host = 'mailhog'; // Docker service name
$mail->Port = 1025;
$mail->SMTPAuth = false;
$mail->SMTPSecure = false;View captured emails at:
👉 http://localhost:8025
git clone https://github.com/Peterbins/Docker-lamp.git
cd Docker-lamp/
sudo docker compose up -dService URL
Website http://localhost phpMyAdmin http://localhost:8080 MailHog http://localhost:8025
docker compose downdocker compose up -ddocker compose up -d --buildDocker-lamp/
│
├── bin/
│ ├── webserver/ # PHP + Apache build
│ └── mysql/ # Database engine build
│
├── config/
│ ├── php/ # php.ini
│ └── vhosts/ # Apache VirtualHosts
│
├── data/ # Persistent database files
├── logs/ # Apache & MySQL logs
└── www/ # Public web root
- MailHog does not send real emails --- all messages are captured locally.
- Perfect for development, testing, and local PHP/LAMP projects.