forked from gh-mirrors/docker-php-5.3
Merge pull request #5 from hrak/fpm_listen
Allow override of fpm listen directive using PHP_FPM_LISTEN.
This commit is contained in:
@@ -261,7 +261,8 @@ RUN set -eux; \
|
|||||||
apt-get clean; \
|
apt-get clean; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV PHP_INI_DIR /usr/local/etc/php
|
ENV PHP_INI_DIR="/usr/local/etc/php" \
|
||||||
|
PHP_FPM_LISTEN=9000
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
mkdir -p "$PHP_INI_DIR/conf.d"; \
|
mkdir -p "$PHP_INI_DIR/conf.d"; \
|
||||||
@@ -317,7 +318,7 @@ RUN set -eux; \
|
|||||||
echo 'daemonize = no'; \
|
echo 'daemonize = no'; \
|
||||||
echo; \
|
echo; \
|
||||||
echo '[www]'; \
|
echo '[www]'; \
|
||||||
echo 'listen = 9000'; \
|
echo 'listen = ${PHP_FPM_LISTEN}'; \
|
||||||
} | tee php-fpm.d/zz-docker.conf
|
} | tee php-fpm.d/zz-docker.conf
|
||||||
|
|
||||||
# Override stop signal to stop process gracefully
|
# Override stop signal to stop process gracefully
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -14,3 +14,13 @@ Because we have some legacy Symfony apps running that will eventually be phased
|
|||||||
* MySQL 5.7.30
|
* MySQL 5.7.30
|
||||||
|
|
||||||
See the [README](https://github.com/docker-library/docs/blob/master/php/README.md) of the official PHP Docker image for information on how to use this image.
|
See the [README](https://github.com/docker-library/docs/blob/master/php/README.md) of the official PHP Docker image for information on how to use this 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.
|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user