A custom Docker image based on php:8.2-apache, pre-configured with essential PHP extensions, Apache modules, and Composer — ready for development or production use.
📦 Base Image: php:8.2-apache
📁 Source Code: GitHub Repository
✅ Features
- Based on official
php:8.2-apache .htaccessandmod_rewriteenabled- Composer installed globally
- Included PHP extensions:
pdo,pdo_mysql,mysqlizip,gd(with freetype and jpeg support)imagick(via PECL)
- Apache modules:
rewrite,cgi,headers - Default
index.phpandinfo.phpfiles included
🏗 Build Instructions
Standard build:
docker build -t luri/php-apache .Multi-architecture build:
docker buildx build --platform linux/amd64,linux/arm64 -t luri/php-apache:multiarch .🚀 Usage
Run the container:
docker run -d -p 8080:80 luri/php-apache
Access your application at: http://localhost:8080
Running to shell:
docker run -it --rm --name apache luri/php-apache bash
Running with docker compose:
📁 Included Files
files/index.php– Default welcome pagefiles/info.php– PHP info page- (Optional) Custom Apache virtual host config:
files/apache/apache-vhost.conf
⚙️ Configuration Notes
.htaccessenabled globally viaAllowOverride All- Apache
ServerNameset tolocalhostto prevent warnings
📌 Info
- Default port:
80 - Supported platforms:
amd64,arm64 - Suitable for PHP web app development and lightweight production use
Fork and customize this image at GitHub. Pull requests and contributions are welcome!