/php-fpm

Docker container to install and run PHP-FPM

Primary LanguageDockerfile

PHP-FPM Docker Image

Docker container to install and run PHP-FPM.

Build Status Automated Build

Supported branches and respective Dockerfile links

What is PHP-FPM

PHP-FPM (FastCGI Process Manager) is an alternative FastCGI implementation for PHP.

Getting image

sudo docker image pull nanoninja/php-fpm

Running your PHP script

Run the PHP-FPM image, mounting a directory from your host.

sudo docker container run --rm -v $(pwd):/var/www/html nanoninja/php-fpm php index.php

Running as server

sudo docker container run --rm --name phpfpm -v $(pwd):/var/www/html -p 3000:3000 nanoninja/php-fpm php -S="0.0.0.0:3000" -t="/var/www/html"

or using Docker Compose :

version: '3'
services:
  phpfpm:
    container_name: phpfpm
    image: nanoninja/php-fpm
    ports:
      - 3000:3000
    volumes:
      - /path/to/your/app:/var/www/html
    command: php -S="0.0.0.0:3000" -t="/var/www/html"

Logging

sudo docker container logs phpfpm

Installed extensions

sudo docker container run --rm nanoninja/php-fpm php -m

PHP Modules

  • bcmath
  • bz2
  • calendar
  • Core
  • ctype
  • curl
  • date
  • dom
  • exif
  • fileinfo
  • filter
  • ftp
  • gd
  • gettext
  • hash
  • iconv
  • imagick
  • imap
  • intl
  • json
  • ldap
  • libxml
  • mbstring
  • memcached
  • mongodb
  • mysqli
  • mysqlnd
  • openssl
  • pcre
  • PDO
  • pdo_mysql
  • pdo_pgsql
  • pdo_sqlite
  • pgsql
  • Phar
  • posix
  • readline
  • redis
  • Reflection
  • session
  • SimpleXML
  • soap
  • sockets
  • sodium
  • SPL
  • sqlite3
  • standard
  • tokenizer
  • xdebug
  • xml
  • xmlreader
  • xmlrpc
  • xmlwriter
  • xsl
  • Zend OPcache
  • zip
  • zlib

Zend Modules

  • Xdebug
  • Zend OPcache