Same as dockerfile/nginx but
with nginx mainline
(1.7.4) instead of stable
plus nginx-sticky-module-ng
(1.2.5) for load balancing with sticky session.
This repository contains Dockerfile of Nginx for Docker's of forked trusted build published to the public Docker Registry.
-
Install Docker.
-
Download trusted build from public Docker Registry:
docker pull webdizz/nginx
(alternatively, you can build an image from Dockerfile:
docker build -t="webdizz/nginx" github.com/webdizz/nginx
)
docker run -d -p 80:80 webdizz/nginx
docker run -d -p 80:80 -p 443:443 -v <sites-enabled-dir>:/etc/nginx/sites-enabled -v <log-dir>:/var/log/nginx webdizz/nginx
docker run --name="nginx" -d -e ROOT_PASS="v68y0n82" -p 2222:22 -p 80:80 -p 443:443 \
-v /vagrant/images/nginx/external/conf/nginx.conf:/usr/local/nginx/conf/nginx.conf \
-v /vagrant/images/nginx/external/conf/sites-enabled:/usr/local/nginx/conf/sites-enabled \
-v /vagrant/images/nginx/external/conf/includes:/usr/local/nginx/conf/includes \
-v /vagrant/images/nginx/external/logs:/usr/local/nginx/logs \
-v /vagrant/images/nginx/external/static:/usr/local/nginx/html \
webdizz/nginx
Open http://<host>
to see the welcome page.