Sign inSign up

schnippi78/nginx-php-fpm

By schnippi78

•Updated 4 months ago

Batteries-included PHP 8.3-FPM (Alpine) for an nginx + php-fpm + MariaDB stack

Image
0

126

schnippi78/nginx-php-fpm repository overview

⁠nginx-php-fpm

A small, batteries-included PHP 8.3-FPM image (Alpine) for the php-fpm half of a typical nginx + php-fpm + MariaDB stack.

It is just the official php:8.3-fpm-alpine image plus the few things almost every small PHP + MariaDB site needs, so you don't have to bake your own:

  • MySQL/MariaDB drivers — pdo, pdo_mysql, mysqli
  • Composer installed globally
  • PHPMailer pre-installed in /var/www
  • curl and unzip

There is no nginx inside this image — the name reflects its role: the PHP-FPM half of an nginx + php-fpm setup. Pair it with an nginx container that forwards .php requests to php-fpm:9000.

Source & docs: https://github.com/schnippi78/nginx-php-fpm⁠ (MIT licensed)

⁠Quick start

docker run -d --name php-fpm \
  -v $(pwd)/app:/var/www \
  schnippi78/nginx-php-fpm:latest

PHP-FPM listens on port 9000. Point your nginx fastcgi_pass at php-fpm:9000.

⁠docker-compose sketch

services:
  nginx:
    image: nginx:alpine
    ports: ["8080:80"]
    volumes:
      - ./app:/var/www
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
  php-fpm:
    image: schnippi78/nginx-php-fpm:latest
    volumes:
      - ./app:/var/www

⁠License

MIT. Built on the official PHP image; bundles PHPMailer (LGPL-2.1). Full docs and an nginx config example on GitHub: https://github.com/schnippi78/nginx-php-fpm⁠

Tag summary

Content type

Image

Digest

sha256:f6a367aca…

Size

33.4 MB

Last updated

4 months ago

docker pull schnippi78/nginx-php-fpm