Sign inSign up

chialab/php-xhprof

By chialab

•Updated 7 days ago

Adding common PHP extensions to some of the official PHP Docker images for profiling.

Image
0

10K+

chialab/php-xhprof repository overview

Docker PHP Images logo ⁠

Docker PHP images

GitHub Workflow Status Source link Authors link Docker Pulls License


Docker images built on top of the official PHP images⁠ with the addition of some common and useful extensions, installed with mlocati/docker-php-extension-installer⁠, and are meant for profiling purposes. You can find these images on the Docker Hub⁠ (and if you're reading this file, you're probably already there).

An automated build is set up, so they should be always up-to-date with the Dockerfiles in the GitHub repository⁠. Also, every time an official PHP image is updated, a rebuild is triggered, so that you will always find the latest security patches installed in these images.

For more production-like environments, you might want to choose an image without XHProf installed⁠, instead.

⁠Available tags

  • latest
  • 5.6
  • 5.6-apache
  • 5.6-fpm
  • 7.0
  • 7.0-apache
  • 7.0-fpm
  • 7.1
  • 7.1-apache
  • 7.1-fpm
  • 7.2
  • 7.2-apache
  • 7.2-fpm
  • 7.3
  • 7.3-apache
  • 7.3-fpm
  • 7.4
  • 7.4-apache
  • 7.4-fpm
  • 8.0
  • 8.0-apache
  • 8.0-fpm

As you might have guessed, all tags are built on top of the corresponding tag of the official image. Not all tags are supported in order to easen maintenance.

⁠Installed extensions

The following modules and extensions have been enabled, in addition to those you can already find in the official PHP image⁠:

  • bcmath
  • bz2
  • calendar
  • exif
  • gd
  • iconv
  • intl
  • ldap
  • mbstring
  • mcrypt (only PHP ≤ 7.1)
  • memcached
  • mysql (only PHP 5.x)
  • mysqli
  • pdo_mysql
  • pdo_pgsql
  • pgsql
  • redis
  • soap
  • sockets
  • xhprof
  • xsl
  • Zend OPcache
  • zip

You will probably not need all this stuff. Even if having some extra extensions loaded ain't a big issue in most cases (especially in a development environment), you will very likely want to checkout this repository, remove unwanted extensions from the Dockerfile, and build your own image — for sometimes removing is easier than adding. 😉

⁠Composer

Composer⁠ is installed globally in all images. Please, refer to their documentation for usage hints.
Prestissimo (composer plugin)⁠ is installed globally in all images. Plugin that downloads packages in parallel to speed up the installation process of Composer packages.

⁠Configuring XHProf

Look at XHProf documentation⁠ for additional configurations. You will need to pass these configurations via Apache or Nginx configuration files.

⁠Using Apache

Specify additional options via php_value, e.g.:

php_value xhprof.output_dir /home/me/xhprof
⁠Using Nginx

Parameters must be passed to the FastCGI PHP interpreter via fastcgi_param, e.g.:

fastcgi_param PHP_VALUE "xhprof.output_dir=/home/me/xhprof";

⁠Contributing

If you find an issue, or have a special wish not yet fulfilled, please open an issue on GitHub⁠ providing as many details as you can (the more you are specific about your problem, the easier it is for us to fix it).

Pull requests are welcome, too! 😁 Please, run make build and make test before attempting a pull request. Also, it would be nice if you could follow best practices for writing Dockerfiles⁠.

Tag summary

Content type

Image

Digest

sha256:c3511ef33…

Size

273.2 MB

Last updated

7 days ago

docker pull chialab/php-xhprof