Public | Automated Build

Last pushed: 2 days ago
Short Description
This image is based on the official nginx image with minor modifications.
Full Description

Supported tags

  • latest

About this image

This image is based on the official nginx image.

In addition to the base image the following changes have been made:

  • enable gzip
  • doe not send the nginx version because of security reasons
  • disable "Last-Modified" header because the file modification date may not be accurate (etag still on)
  • root for all static assets is "/var/www/static"

The image does export port 80.

It has a volume defined to serve static resources at /var/www/static.

How to use this image

hosting simple static content

docker run -v /some/content:/var/www/static:ro -d alang/nginx

Alternatively, a simple Dockerfile can be used to generate a new image that includes the necessary content:

FROM alang/nginx
COPY static-html-directory /var/www/static

complex configuration

To provide additional configuration add files with the .conf extension to /etc/nginx/conf.d/ or /etc/nginx/server/.

# ...
# <- /etc/nginx/conf.d/*.conf goes here
server {
    # ...
    # <- /etc/nginx/server/*.conf goes here

For example:

FROM alang/nginx
COPY caching.conf /etc/nginx/server/

User Feedback


If you have any problems with or questions about this image, please contact me through a GitHub issue.


You are invited to contribute new features, fixes, or updates, large or small.
Please send me a pull request.

Docker Pull Command
Source Repository