Sign inSign up

luri/php-nginx

By luri

•Updated over 1 year ago

Docker Image for Nginx and PHP 8.2 with Composer & Extensions

Image
0

323

luri/php-nginx repository overview

⁠🐳 Docker Image for Nginx and PHP 8.2 with Composer & Extensions

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⁠


ā āœ… Features

  • 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 and info.php

ā šŸš€ Usage

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

ā šŸ“ Included Files

  • files/nginx/default.conf – Preconfigured Nginx virtual host
  • files/index.php – Welcome page
  • files/info.php – PHP info page

ā āš™ļø Configuration Notes

  • 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

ā šŸ“Œ Info

  • Default exposed port: 8080
  • Platforms supported: amd64, arm64
  • Ideal for both local development and lightweight deployments

⁠🐳 Example: docker-compose.yml

services:
  web:
    build:
      context: .
    image: luri/php-apache
    environment:
      - PORT
    ports:
      - "${PORT}:80"
#    volumes:
#      - ./src:/app
    env_file:
      - .env

Tag summary

Content type

Image

Digest

sha256:0a8035c84…

Size

299.1 MB

Last updated

over 1 year ago

docker pull luri/php-nginx