Public Repository

Last pushed: 6 days ago
Short Description
Alpine-based Minimal Nginx Web Server -- Use on AWS ECS & Fargate, Heroku, Digital Ocean, Zeit Now
Full Description

Looking for npm scripts for Docker? Go here!
Looking for npm scripts for AWS ECS? Go here!

A high-performance Alpine-based Nginx base image for Docker to serve static websites. It will serve anything in the /var/www directory.

Supported Tags

  • [latest],[1.14.0-alpine],[1.13.8-alpine]

Submit a PR on GitHub


Forked from kyma/docker-nginx

How to Use

To build a Docker image for your site, you'll need to create a Dockerfile. For example, if your site is in a directory called src/, you could create this Dockerfile:

FROM duluca/minimal-nginx-web-server
COPY src/ /var/www
CMD 'nginx'

Then build and run it:

$ docker build -t mysite .
Successfully built 5ae2fb5cf4f8
$ docker run -p 80:80 -d mysite
$ curl localhost


To use SSL, put your certs in /etc/nginx/ssl and enable the default-ssl site:

ADD server.crt /etc/nginx/ssl/
ADD server.key /etc/nginx/ssl/
RUN ln -s /etc/nginx/sites-available/default-ssl /etc/nginx/sites-enabled/default-ssl

When you run it, you'll want to make port 443 available, e.g.:

$ docker run -p 80:80 -p 443:443 -d mysite


The nginx.conf and mime.types are pulled with slight modifications from
the h5bp Nginx HTTP server boilerplate configs project at

Customized configs

To modify the NGINX config, you would just create a custom Dockerfile like the following
where you copy in your modified config files.

# Guide here:

# Build docker file
# docker build -t CONTAINERNAME .

# Build from this repo's image
FROM duluca/minimal-nginx-web-server

# Example if you wanna swap the default server file.
COPY path/to/your/default /etc/nginx/sites-enabled/default

# Add src.
COPY src/ /var/www

CMD 'nginx'

For Developers

Build & Publish

Execute ./

Docker Pull Command