- This repository provides a dockerised bundle of nginx and php5-fpm.
- The container is running nginx-1.4.6 and php5-fpm-5.5.9 on Ubuntu 14.04 LTS.
- Replace or modify the provided configuration files in
Be careful with the daemons !
Both nginx and php5-fpm need to be run in non-daemon mode by supervisord.
As such, changes have been made in the config files; if you replace them by yours,
be careful to add :
daemon off;in your nginx.conf
daemonize = no;in your php-fpm.conf
- Clone the repo and cd into it
- Build the image with
docker build -t hungdn/nginxphp .
This image exposes 3 volumes
Run it with
docker run -d -p 127.0.0.1:80:80 -v /<path_to_the_repo>/sites-enabled:/etc/nginx/sites-enabled hungdn/nginxphp
- You probably want to run this image on a public interface (and not localhost),
change the ip adress accordingly.
- You can mount multiple directories by passing multiple -v arguments