Sign inSign up

ball6847/nginx-proxy

By ball6847

•Updated over 10 years ago

simple docker image use nginx as proxy to your running container

Image
0

356

ball6847/nginx-proxy repository overview

⁠nginx-proxy

nginx-proxy is a simple nginx container acting as proxy server to your running container (do not use in production)

⁠Usage:

docker run -d \
  --name nginx-proxy \
  -p 80:80 \
  -v $PWD/proxy.conf:/proxy.conf \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  ball6847/nginx-proxy
⁠Example of proxy.conf
example.com nginx:80
example2.com my-container:80

while example.com is domain name you want to use to access the proxy, and nginx:80 is proxy backend in HOSTNAME:PORT format, you can use container name or ip address.

Note: You need to restart the container if you modify proxy.conf to make it take effect.

⁠VHOST Template

You can use you own vhost template using Mustache Template Engine for Bash⁠ Syntax, just mount a volume at /vhost.tpl, please see vhost.tpl⁠ for original template.

docker run -d \
  --name nginx-proxy \
  -p 80:80 \
  -v $PWD/proxy.conf:/proxy.conf \
  -v $PWD/vhost.tpl:/vhost.tpl \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  ball6847/nginx-proxy
⁠CREDIT
⁠MAINTAINER

Tag summary

Content type

Image

Digest

sha256:a4e4039b2…

Size

25.5 MB

Last updated

over 10 years ago

docker pull ball6847/nginx-proxy