Public | Automated Build

Last pushed: 2 years ago
Short Description
A php-fpm server for running your php application thru fast-cgi.
Full Description

What is php-fpm ?

Php-fpm stands for php Fast Process Management.

This is a part of the PHP-core, aiming at running PHP scripts inside a Fast-CGI process, with some performance and functional ease in mind.

It's generally used along Nginx, as alternative to Apache's mod_php.

How do you use this image ?

Basic mode :

Just run it as a normal demonized image, sharing the directory containing your php application (Keep in mind that that fast-cgi client should provide the path to the php script, so there is no docroot concept inside php-fpm - cf. http://blog.martinfjordvald.com/2011/01/no-input-file-specified-with-php-and-nginx/ ) :

docker run -v $(pwd):/app -d dduportal/phpfpm

Note that we expose, by default, the default php-fpm listening port : 9000

Customize the php-fpm configuration at launch time

While we use an entrypoint, you just have to provide your custom options thru docker run command, like your config file (see http://linux.die.net/man/8/php-fpm for example) :

docker run -v $(pwd):/app  -d dduportal/phpfpm -y /app/conf/php-fpm.conf

Customize at image build time (thru Dockerfile)

If the image doesn't fit your needs "as it", you can customize it thru a Dockerfile, for example :

FROM dduportal/phpfpm
MAINTAINER your.mail@here

ADD . /app/ # your php app
CMD ["-y","/app/conf/my-php.conf"]
# Your custom stuff here if needed

Note that ENTRYPOINT will be herited.

Run it now (without option while you provide them inside the image instead of at run time ) :

docker build -t you/phpfpm ./
docker run -d you/phpfpm 
Docker Pull Command
Owner
dduportal
Source Repository