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 .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
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-apacheAccess your application at: http://localhost:8080
Running to shell:
docker run -it --rm --name apache luri/php-apache bashRunning with docker compose:
docker compose upfiles/index.php– Default welcome pagefiles/info.php– PHP info page- (Optional) Custom Apache virtual host config:
files/apache/apache-vhost.conf
.htaccessenabled globally viaAllowOverride All- Apache
ServerNameset tolocalhostto 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!