Public Repository

Last pushed: 3 years ago
Short Description
Simple Nginx with PHP-FPM with host-fs mounted webroot
Full Description

YouTube video about the usage:

How to use?

Create a container:

docker run \
       -d --name experiments-container-1 \
       -p 80 \
       -v `pwd`:/var/www \
       yitsushi/nginx-static-and-php \

This maps your current directory to the container as /var/www. This is the webroot. start is a script that starts php-fpm and nginx (nginx is not a daemon)

After that I made a Makefile in my Experiments directory:

    -@docker start experiments-container-1
    -@open http://`boot2docker ip 2>/dev/null`":"`docker port experiments-container-1 80 | sed -e 's/.*://g'`/

It tries to start the container (if it's running then nothing happens) then open the public port.

If you are on Linux then you don't need boot2docker and you can specify the port number at creation with -p 80:80 instead of -p 80.

Here is a simple front-page for your new sandbox: index.php


  • Nginx
  • PHP GD

more coming maybe

Docker Pull Command