Install php-fpm into a Linux container
PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.
These features include:
It was not designed with virtual hosting in mind (large amounts of pools) however it can be adapted for any usage model.
http://php.net/manual/en/install.fpm.php
docker create --name=php-fpm \
-v /etc/localtime:/etc/localtime:ro \
-v <path to webroot>:/www \
-v <path to fpm config>:/etc/php5/fpm.d \
-v <path to fpm logs>:/var/log/php5 \
-e DOCKUID=<UID default:10001> \
-e DOCKGID=<GID default:10001> \
-e DOCKMAIL=<mail address> \
-e DOCKRELAY=<smtp relay> \
-e DOCKMAILDOMAIN=<originating mail domain> \
-p 9000:9000 digrouz/docker-phpfpm
When you start the php-fpm image, you can adjust the configuration of the php-fpm instance by passing one or more environment variables on the docker run command line.
DOCKUIDThis variable is not mandatory and specifies the user id that will be set to run the application. It has default value 10001.
DOCKGIDThis variable is not mandatory and specifies the group id that will be set to run the application. It has default value 10001.
DOCKRELAYThis variable is not mandatory and specifies the smtp relay that will be used to send email. Do not specify any if mail notifications are not required.
DOCKMAILThis variable is not mandatory and specifies the mail that has to be used to send email. Do not specify any if mail notifications are not required.
DOCKMAILDOMAINThis variable is not mandatory and specifies the address where the mail appears to come from for user authentication. Do not specify any if mail notifications are not required.
Content type
Image
Digest
sha256:7b04ffa46…
Size
87.7 MB
Last updated
about 1 year ago
docker pull digrouz/php-fpm