A Dockerfile to create a Docker image with nginx and php5-fpm
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 45 commits ahead, 2 commits behind darron:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
debian
lemp
Dockerfile
LICENSE
README.md
default-site
docker-clean

README.md

docker-nginx-php5

A Dockerfile to create a Docker image with nginx and php5-fpm

This was created using this blog post and lots of Googling.

It's posted on the Docker INDEX at ishakuta/docker-nginx-php5

Some size research on docker folders: docker folders size with this image and stackbrew base images

To build:

git clone https://github.com/ishakuta/docker-nginx-php5.git
cd docker-nginx-php5
docker build -t <yournamehere>/nginx .

You can then run the built image: docker run -d <yournamehere>/nginx-php5-fpm

You should see a running image if you run docker ps

vagrant@ubuntu-13:~$ docker run -d <yournamehere>/nginx-php5-fpm
6592bc4c0193
vagrant@ubuntu-13:~$ docker ps
ID                  IMAGE                 COMMAND                CREATED             STATUS              PORTS
6592bc4c0193        <yournamehere>/docker-nginx-php5:latest   /bin/sh -c service p   2 seconds ago       Up 1 seconds        49153->80

To serve another site - you can layer on top of this - here's an example Dockerfile:

FROM ishakuta/docker-nginx-php5

# Build your new site here. 
RUN echo "Site 123 ABC" > /var/www/index.php
RUN echo "<?php phpinfo(); ?>" >> /var/www/index.php
 
EXPOSE 80
 
CMD service php5-fpm start && nginx