install Zend Opcache by default

This commit is contained in:
Hans Rakers
2020-10-09 13:42:41 +02:00
parent 7bd4c974ac
commit a4a5333889
2 changed files with 11 additions and 2 deletions

View File

@@ -279,6 +279,11 @@ RUN set -eux; \
cd /; \ cd /; \
docker-php-source delete; \ docker-php-source delete; \
pecl update-channels; \ 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; \ rm -rf /tmp/pear ~/.pearrc; \
php --version php --version

View File

@@ -17,10 +17,14 @@ See the [README](https://github.com/docker-library/docs/blob/master/php/README.m
## Differences with the original image ## 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 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