You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
root e02f17166a first commit 5 years ago
rootfs first commit 5 years ago
.Dockerfile.swp first commit 5 years ago
.drone.yml first commit 5 years ago
Dockerfile first commit 5 years ago first commit 5 years ago first commit 5 years ago
docker-compose.yml first commit 5 years ago


Build Status

This image is build and push with, a circle-ci like self-hosted. If you don't trust, you can build yourself.

Tag available


  • No ROOT process
  • Automatic configuration generation
  • Automatic certificate generation and renew with letsencrypt and without downtime (use lego)
  • Latest nginx version
  • ARG for custom build


What is Nginx?

nginx (engine x) is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP proxy server, originally written by Igor Sysoev. For a long time, it has been running on many heavily loaded Russian sites including Yandex, Mail.Ru, VK, and Rambler. According to Netcraft, nginx served or proxied 24.29% busiest sites in December 2015. Here are some of the success stories: Netflix,, FastMail.FM.

Reverse-nginx generate for you the configuration of reverse proxy. Like traefik, it is based on the labels of containers, but it isn't dynamicly.

Build Image

Build arguments

  • NGINX_CONF : Nginx make configure options
  • NGINX_VER : Nginx version
  • ARG NGINX_GPG : GPG fingerprint (default : "B0F4253373F8F6F510D42178520A9993A1C052F8")
  • ARG BUILD_CORES : Number of core use for make nginx (default : All cores)

Simply build

docker build -t xataz/reverse-nginx

Build other version

docker build -t xataz/reverse-nginx --build-arg NGINX_VER=1.9.5



  • UID : Choose uid for launch nginx (default : 991)
  • GID : Choose gid for launch nginx (default : 991)


  • /nginx/ssl : For certificate persistance
  • /nginx/custom_sites : For create your own sites
  • /tor/ : For tor address


  • 8080
  • 8443



Variable Description default value
UID UID for launch nginx 991 Valid UID number
GID GID for launch nginx 991 Valid GID number
EMAIL email use for generate letsencrypt certificates admin@mydomain.local Valid address mail


Label Name Description default value
reverse.frontend.domain Domain Name for this service mydomain.local valid domain name
reverse.frontend.path Domain path (warning, no rewrite url) / valid path, with /
reverse.frontend.auth For auth basic none user:encryptpassword
reverse.frontend.ssltype Choose ssl type ec384 rsa2048, rsa4096, rsa8192, ec256 or ec384
reverse.frontend.domain_max_body_size Choose max size upload 200M Numeric value with unit (K,M,G,T)
reverse.frontend.ssl Generate letsencrypt certificate false true or false
reverse.frontend.tor If container is an hidden service false boolean (true / false)
reverse.backend.port Port use by container 8080 Valid port number

More labels soon !!!


First launch another container

For exemple, I launch lutim container :

$ docker run -d \
    --name lutim \
    --label \
    --label reverse.frontend.path=lutim \
    --label reverse.frontend.auth=USER:$(openssl passwd -crypt PASSWORD) \
    --label reverse.frontend.ssltype=ec256 \
    --label reverse.frontend.ssl = true \
    --label reverse.backend.port=8181 \
    -v /docker/config/lutim/data:/data \
    -v /docker/data/lutim:/lutim/files \
    -e UID=1001 \
    -e GID=1001 \
    -e WEBROOT=/lutim \
    -e SECRET=$(date +%s | md5sum | head -c 32) \
    -e \
    -e MAX_FILE_SIZE=250000000 \

Launch reverse-nginx

docker run -d \
	-p 80:8080 \
	-p 443:8443 \
    --name reverse \
    -e \
    -v /var/run/docker.sock:/var/run/docker.sock \

URI Access :