Public | Automated Build

Last pushed: 5 hours ago
Short Description
PHP 7 FPM, nginx 1.9, the php redis extension, supervisor, netcat, and a few other common essentials
Full Description


This Docker image extends :alpine-official to add XHProf profiler.
It actually uses an experminental fork of XHProf that works on PHP7.


Use it in place of :alpine-official when you want profiling.

Add the following when you want to start profiling your code:


Add the following when you want to stop profiling:

    $name = time();
    $type = "my-app-1";
    $filename = "/var/www/profiles/$name.hub9.xhprof";
    file_put_contents($filename, serialize(xhprof_disable()));`

I recommend you mount the profiles directory on your host. Ie, in your docker-compose:

        image: tuimedia/base:alpine-profiler
            - ./profiles:/var/www/profiles

A note about naming: the XHProf UI is a piece of shit, but it works.

To use XHProf UI the profiles must be:

  • named name.type.xhprof
  • name must a hexadecimal digit that returns true when passed to ctype_xdigit
  • type must be present
  • The name and type must be separated by a dot
  • The file extension must be xhprof

Using the XHProf UI

There are a lot of UIs for XHProf. The simplest (hah) to setup is the UI included in XHProf.

Docker Pull Command
Source Repository