A custom Docker image combining PHP 8.2-FPM and Nginx, optimized for modern PHP development environments with essential extensions and Composer support built-in.
📦 Base Image: php:8.2-fpm
📁 Source Code: GitHub Repository
- Based on
php:8.2-fpm
- Nginx pre-installed and configured
- Composer included (via
composer:2
) - PHP extensions included:
pdo
,pdo_mysql
,mysqli
gd
(with freetype and jpeg)imagick
(via PECL)
- Lightweight and production-ready
- Includes default
index.php
andinfo.php
Standard build:
docker build -t luri/php-nginx .
Multi-architecture build:
docker buildx build --platform linux/amd64,linux/arm64 -t luri/php-nginx:multiarch .
docker run -d -p 8080:8080 luri/php-nginx
Then open: http://localhost:8080
Running to shell:
docker run -it --rm --name nginx luri/php-nginx bash
Running with docker compose:
docker compose up
files/nginx/default.conf
– Preconfigured Nginx virtual hostfiles/index.php
– Welcome pagefiles/info.php
– PHP info page
- Default Nginx config listens on port
8080
- PHP-FPM runs as a background process, with Nginx in the foreground
- Working directory is set to
/app
- Default exposed port:
8080
- Platforms supported:
amd64
,arm64
- Ideal for both local development and lightweight deployments
Fork and customize this image at GitHub. PRs welcome!