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
- Based on official
php:8.2-apache
.htaccess
andmod_rewrite
enabled- Composer installed globally
- Included PHP extensions:
pdo
,pdo_mysql
,mysqli
zip
,gd
(with freetype and jpeg support)imagick
(via PECL)
- Apache modules:
rewrite
,cgi
,headers
- Default
index.php
andinfo.php
files included
Standard build:
docker build -t luri/php-apache .
Multi-architecture build:
docker buildx build --platform linux/amd64,linux/arm64 -t luri/php-apache:multiarch .
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:
docker compose up
files/index.php
– Default welcome pagefiles/info.php
– PHP info page- (Optional) Custom Apache virtual host config:
files/apache/apache-vhost.conf
.htaccess
enabled globally viaAllowOverride All
- Apache
ServerName
set tolocalhost
to prevent warnings
- 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!