From a4a53338894cd3c1db2937c06e18417732323a94 Mon Sep 17 00:00:00 2001 From: Hans Rakers Date: Fri, 9 Oct 2020 13:42:41 +0200 Subject: [PATCH] install Zend Opcache by default --- Dockerfile | 5 +++++ README.md | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d3769c..ac5e91e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -279,6 +279,11 @@ RUN set -eux; \ cd /; \ docker-php-source delete; \ pecl update-channels; \ + # This solves the "not a valid package archive" errors + pear upgrade -Z Archive_Tar; \ + # Install Zend Opcache + pecl install zendopcache; \ + docker-php-ext-enable opcache; \ rm -rf /tmp/pear ~/.pearrc; \ php --version diff --git a/README.md b/README.md index 9263e62..64f3d3f 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,14 @@ See the [README](https://github.com/docker-library/docs/blob/master/php/README.m ## Differences with the original image -There are two deviations from the original image. This image contains a backported patch to fpm that changes the order in which configuration files are included from `/usr/local/etc/php-fpm.d`. By default in PHP 5.3 there was no sorting on the glob, causing files to be included in whatever order they appeared in the filesystem, which can differ from system to system. The patch removes the `GLOB_NOSORT` from the call to glob(), causing the files to be included in a alphabetic order. See [Dockerfile](Dockerfile) for details. +There are three deviations from the original image. -This image also allows you to override the default listen directive of fpm. By default, it will listen on `0.0.0.0:9000`, but you can override this using the environment variable `PHP_FPM_LISTEN`. For example: +* This image contains a backported patch to fpm that changes the order in which configuration files are included from `/usr/local/etc/php-fpm.d`. By default in PHP 5.3 there was no sorting on the glob, causing files to be included in whatever order they appeared in the filesystem, which can differ from system to system. The patch removes the `GLOB_NOSORT` from the call to glob(), causing the files to be included in a alphabetic order. See [Dockerfile](Dockerfile) for details. + +* This image also allows you to override the default listen directive of fpm. By default, it will listen on `0.0.0.0:9000`, but you can override this using the environment variable `PHP_FPM_LISTEN`. For example: ``` docker run -it -e PHP_FPM_LISTEN="localhost:9000" hrak/php-5.3:latest ``` + +* Zend Opcache is included (extension load, but not enabled by default). You can enable and configure it through php.ini