This is a container that uses Nginx
You can provide a "default" with your vhost configuration, I'm providing two examples in the config directory:
Nginx will look for some configurations in some directories so you need to mount your directories to point to the right directories.
To run as proxy:
docker run -d -v /etc/nginx/sites-enabled:/etc/nginx/sites-enabled -v /var/www/webfiles:/var/www -v /var/log/docker:/var/log/supervisor --name proxy --net=host -p 80:80 image/nginx
Notice the --net=host, it's necessary so the container can access the host.
To run as a simple web server:
docker run -d -v /etc/nginx/sites-enabled:/etc/nginx/sites-enabled -v /var/www/webfiles:/var/www -v /var/log/docker:/var/log/supervisor --name http -p 80:80 image/nginx
Content type
Image
Digest
sha256:6af9aaf87…
Size
98.8 MB
Last updated
almost 11 years ago
docker pull luis/nginx