Serving a PHP homepage locally with Docker

The finishing touches of a milestone release sometimes involves updating of the project homepage. In the case of Virgo this is a PHP powered site. Before the rise of Docker setting up a development environment to locally test the changes was a major task.

As of today this is quite easy and doesn't interfere with the developer machine at all.

Simply grab the source of the homepage (plus the companion commons repo) and fire up a temporary webserver:

$ git clone git:// virgo
$ git clone git://

...and fire up a Docker container linking the source of the homepage:

$ docker run --rm -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:5.6-apache

This command serves the homepage locally on port http://locahost:80 right from the current directory.

For more information visit php@dockerhub.