Skip to content

janeczku/docker-debian-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Debian Nginx image

Nginx Docker image - based on Debian Wheezy

This is the janeczku/debian-nginx Docker image providing Nginx 1.8 (Dotdeb) with a well organized configuration layout tuned for great performance.

Docker Hub trusted builds

ImageLayers Size


Features

Directory structure

/data/www # web content
/data/conf/nginx/ # extra Nginx configs

Default host

Default host will be generated by setting env var GENERATE_DEFAULT_HOST=true. It will serve the content located in /data/www/default.

Dummy SSL certificates

The default host is configured to work on HTTPS as well.

Error logging

Nginx error logs are available via docker logs [container].

Usage

Quick Start

docker run -d --name=web -p=80:80 -p=443:443 -e GENERATE_DEFAULT_HOST=true janeczku/debian-nginx

By creating a new image and embedding the web content

FROM janeczku/debian-nginx
ADD webroot /data/www/default/
ADD default-host.conf /data/conf/nginx/hosts.d/

By mounting a data container

docker run -d --name=web-data -v /data busybox
docker run -d --name=web --volumes-from=web-data -p=80:80 -e GENERATE_DEFAULT_HOST=true janeczku/debian-nginx

Customize

Modify Nginx global configuration (http {} context) by adding configs in any of the following locations:

/etc/nginx/nginx.d/*.conf
/data/conf/nginx/nginx.d/*.conf

/etc/nginx/addon.d/*.conf
/data/conf/nginx/addon.d/*.conf

Add hosts by placing their configs in following locations:

/etc/nginx/hosts.d/*.conf
/data/conf/nginx/hosts.d/*.conf

Extra location for including configs in host.conf, in server {} context:

include     /etc/nginx/conf.d/default-*.conf;
include     /data/conf/nginx/conf.d/default-*.conf;

About

🐳 Nginx 1.8 (Dotdeb) image based on Debian Wheezy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published