Public | Automated Build

Last pushed: 2 years ago
Short Description
Php Nginx baseimage.
Full Description

<p align="center">
<a href="">
<img height="81" width="341" src="">



A Nginx + PHP 5.6 (FPM) base container. Builds upon on the excellent phusion/baseimage-docker container. You can find the docker automated build here.


All services are defined and managed using the phusion/baseimage methodology. Logs are output using syslog and can be accessed using docker logs {container}.

  • Nginx
  • PHP-FPM (5.6)
  • NTPD
  • New Relic APM

Default Settings

The container sets up a www root folder in the following location:


As a final task a demo index.php is copied to this location.

Web Root

The following folder is specified as the default root web folder:


Note that the /var/www/public is the root folder for serving PHP files for your web server. The following ports are exposed:

  • 80 (HTTP)
  • 443 (HTTPS/SSL)

SSL Self Signed Certificate

The image generates a self-signed certificate for each container within the folder:


During build the build/default file is used to copy and configure nginx default settings. This includes a cipher suite for legacy browser (IE8+) support. See:

Node + NVM

The image contains installation and configuration of node 0.12.10 by default using NVM (Node Version Manager). This can be changed by running: nvm install $NODE_VERSION and using the new node version by running the following command: nvm use $NODE_VERSION

New Relic APM

Installs New Relic APM daemon on container startup to monitor the php application within the image. See this tutorial for more information.

The following environment variables are required in order to complete the New Relic configuration:

  • NR_INSTALL_KEY 134adf09dsfblahsomething
  • NR_APP_NAME "Docker PHP App Name"

If the NR_INSTALL_KEY New Relic will not be setup. By default this will prevent monitoring as the key is invalid until entered on startup. Eg:

docker run --name nginx -e NR_INSTALL_KEY="134adf09dsfblahsomething" -e NR_APP_NAME="nginx-test" -p 80:80 -p 443:443 -d mstrazds/nginx-php56:latest

Build Folder (within repo)

Contains nginx config files as well as php-fpm settings. Also include file that offloads tasks from the Dockerfile to reduce layers.


This image supports mysql and postgres.


Note that PHP-FPM has been configured to pass through environment variables when starting the container using the clear_env = no flag within the /etc/php5/fpm/pool.d/www.conf file.

Added to this repo are the cuda dependencies for running GPU workloads. Also note that the neural-style source repository as added here as a submodule.

Remember if you want the latest changes to the neural-style repo, sync the submodule here.

git submodule sync

Docker Pull Command