GitHunt

Docker Nginx PHP

GitHub release (latest by date) Docker Pulls Docker Image Size GitHub Workflow Status

Docker Repository - bfren ecosystem

Nginx plus PHP (7.4, 8.0, 8.1, 8.2, 8.3, 8.4 and 8.5) - no SSL support etc, designed to be used behind a proxy server. Minimal PHP packages are installed:

  • php
  • php-common
  • php-fpm
  • php-session

Nginx is setup by default to run PHP in FPM mode. To override values in www.conf map a xx.json file to /etc/bf/php-fpm.d - see www-conf-sample.json. Values in the php.ini file can be overridden in the same way - see Docker PHP for more information and a sample file.

Contents

Ports

  • 80

Volumes

Volume Purpose
/www From base image.

Environment Variables

See Docker PHP for configuration instructions.

Nginx Configuration Helpers

The image contains a handful of useful Nginx configuration 'helper' files, which you can find in /overlay/etc/nginx/helpers. They all begin with the prefix 'php':

Helper Description
-try-all.conf Enables SEO-friendly URLs (e.g. without index.php).
-try-php.conf Sends the request to upstream PHP FastCGI Process Manager.

Licence

MIT

Copyright (c) 2020-2026 bfren (unless otherwise stated)

Languages

Dockerfile58.5%Nushell31.2%Shell9.0%PHP1.3%

Contributors

MIT License
Created November 7, 2020
Updated March 5, 2026
bfren/docker-nginx-php | GitHunt