lnmpa-nginx is a Nginx Server boxed in a Docker image built by Tommy Lau.
This image is a nginx web server cooked based on the offical docker image nginx, and with the following modifications.
/var/www as the web root instead of /user/share/nginx/htmlGet the docker image by running the following commands:
docker pull tommylau/nginx
Start an instance:
docker run --name nginx -v /path/to/web:/var/www -p 80:80 -p 443:443 -d tommylau/nginx
This will start an instance, and you are ready to go.
For example, if I like to link to a php-fpm server with the name php5.6 and named the host as php in container. For more information about php-fpm in Docker, please refer to tommylau/php.
docker run --name nginx -v /path/to/web:/var/www --link php5.6:php -p 80:80 -d tommylau/apache
Then in the instance, you can use the hostname php to connect to the php-fpm server, however you still have to modify the nginx config file to connect to php-fpm server php.
Content type
Image
Digest
sha256:20ecc3ff1…
Size
42.5 MB
Last updated
over 8 years ago
docker pull tommylau/nginx