Public | Automated Build

Last pushed: a year ago
Short Description
Image built on the official nginx image that runs as a non-root user.
Full Description

nginx Docker Image

Nginx image based on the official image from nginx that runs as the www-data user.


To configure, override these configuration files:

  • /etc/nginx/conf.d/default.conf
  • /etc/nginx/nginx.conf

You may override them by COPYing your own files in while building with a Dockerfile or by mounting a configuration file in when running.


Because the container runs as a non-root user, nginx is unable to listen on low-numbered (< 1024) ports. Be sure to listen on ports such as 8080 and 8443 and map them to 80 or 443 when running. For example:

# my-config.conf
server {
    listen       8080;
    server_name  localhost;
    location / {
        root   /var/www/htdocs;
        index  index.html index.htm;
docker run -d \
    -p 80:8080 \
    -v $(pwd)/my-config.conf:/etc/nginx/conf.d/default.conf \


This project is managed with a Docker Hub automated build. Pushing changes to origin/master will trigger an update on Docker Hub.

Docker Pull Command
Source Repository