$ sudo docker build -t="paintedfox/php5-stack" .
Container Creation / Running
The Nginx server is configured to host a website from the
/srv/www folder inside the container. The MariaDB server is configured to use the
/data folder inside the container. You can map the container's
/data volumes to volumes on the host so the data becomes independant of the running container.
This example uses
/tmp/data to host from, but you can modify this to your needs. In addition, the example will name the resulting container phpwebapp and will run this as a daemon in the background with the
-d option. Once the container is running, you will be able to connect to your PHP5 application through browser at
$ mkdir -p /tmp/www $ mkdir -p /tmp/data $ sudo docker run -name="phpwebapp" -p 8080:80 -v /tmp/www:/srv/www -v /tmp/data:/data -d paintedfox/php5-stack