Build Scripts for PHP FPM
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Scripts for PHP FPM


This repository provides an opinionated build of PHP FPM, and enables you to quickly build and package modern versions of PHP.

Why should I use this package?

This package provides a opinionated build for PHP + FPM. The primary differentiators between this package and other PPA's are:

  • Cross Platform Consistency: PHP is built exactly the same for Trusty, Xenial, RHEL7, CentOS7, and Alpine 3.6-3.8. Ensure that your local, testing, and production PHP builds are always the same.
  • Extensible: Shared PHP modules are used to allow fine-grain control over which extensions and development tools you wish to have installed. Common modules not distributed with php-src, such as PHP Redis, Libsodium, Argon2, and others are bundled as external dependencies
  • Strong Security: OpenSSL and libcurl are statically compiled into the final binary. Regular updates of point releases ensure bugs of security issues with bundled libraries are promptly updated. Deprecated modules such as mcrypt are disabled by default on versions of PHP that support it. Strong security defaults are bundled with PHP.ini.
  • Publicly auditable builds: All builds are built on TravisCI before publishing (

If you're looking to just use PHP FPM, and want a single binary compiled with the most common extensions, compiled with the latest versions of OpenSSL and cURL, this package is for you. If you'd prefer to have a more modular build, ppa:ondrej/php might be preferable.

Building & Packaging

Tested on Ubuntu 14.04, Ubuntu 16.04, CentOS7, RHEL, and Alpine 3.6

The preferred way of building PHP is to use build and package them within Docker, and then to install PHP from the packages it provides. This allows you to build PHP in an environment isolated from your own, and allows you to install PHP through your package manager, rather than through source. This approach requires both Docker and docker-compose to be installed. (see

  1. Install Docker (
  2. Install Docker Composer 1.15.0+ (
  3. Build PHP-FPM by running docker-compose, and specifying the platform you want to build for
    VERSION=<PHP_VERSION> RELEASEVER=1 docker-compose run <trusty|xenial|centos7|rhel7|alpine3.6>

Note all packages are build for x86_64. x86, armv6l, and armv7l images are not supported. Note that the <PHP_VERSION> corresponds too the git tag of php/php-src, sans PHP.