A Docker build which runs a Ubuntu 14.04 container with Nginx and PHP 5.5.9.
The most current version of Nginx from the Nginx repository is used.
The most current version of PHP from the Ubuntu Trusty repository is used.
Installed packages include
php5-commonphp5-fpmphp5-cliphp5-mysqlndphp5-gdphp5-pspellphp5-snmpphp5-xmlrpcphp5-mcryptphp5-devphp5-jsonphp-pearphp-pecl-xdebugphp-pecl-xhprofThese settings are changed explicitly:
memory_limit is set to 768Mpost_max_size is set to 50Mdate.timezone is set to Europe/LondonAll other settings stay untouched with their default values.
CUSTOM_CONF
If not empty, the default.conf file will be replaced by a symlink to /var/www/html/.docker/nginx.conf.
PHP_POOL
The pool name to use (without brackets), the default is [www]
RUN_COMPOSER
If not empty, composer install will be run as the webserver user in /var/www/html/
VIRTUAL_HOST
The domain name for the container, e.g. www.customer.dev
MAIL_PORT_25_TCP_ADDR
Relay host for postfix
$ sudo docker run -d -p 80 -v /home/containers/web:/var/www/html greencape/nginx-php
$ sudo docker run -d -p 80 -v /home/containers/web:/var/www/html -e VIRTUAL_HOST=www.customer.dev --link database:db greencape/nginx-php
If you want the contained webserver to listen at port 80, be sure not to have a local webserver running and listening at the same port.
Nginx runs as a user called webserver. If you are mounting volumes please create a matching user on your host system using the following;
$ sudo useradd webserver -u 666
Content type
Image
Digest
sha256:020d3768a…
Size
144.9 MB
Last updated
over 10 years ago
docker pull greencape/nginx-php