docker-nginx

Nginx as a Docker image

Nginx as a Docker image

This is a very simple Docker image with Nginx. It can be used to serve the current directory, tuning the behavior with Nginx configuration files.

Running it

Assuming the image has been built as noteed/nginx, running is straightforward:

> docker run -p 80:80 noteed/nginx

The interesting part is to feed the Docker container, and thus Nginx, with your configuration, and possibly a root directory from which Nginx will serve some static content:

> docker run -p 80:80 \
    -v `pwd`/www:/usr/share/nginx/www \
    -v `pwd`/sites-enabled:/etc/nginx/sites-enabled \
    noteed/nginx

While the Docker container is running, the Nginx access logs are displayed.

Related Repositories

docker-nginx-php

docker-nginx-php

An Ubuntu, Nginx and PHP stack Built in Docker ...

docker-nginx

docker-nginx

Nginx Docker image for easy hosting of static sites ...

django-tutorial-docker-nginx-postgres

django-tutorial-docker-nginx-postgres

Django tutorial running with Nginx, Gunicorn, PostgreSQL and docker-compose ...

docker-nginx-php

docker-nginx-php

Docker with Nginx / PHP-FPM 7, 5.6, 5.5. CentOS-7 based. ...

bitnami-docker-nginx

bitnami-docker-nginx

Bitnami nginx Docker Image ...