Sign inSign up

jitta/nginx-proxy

By jitta

•Updated almost 11 years ago

Image
0

270

jitta/nginx-proxy repository overview

⁠nginx-proxy

Automated nginx proxy for Docker containers using docker-gen for Google Cloud

based from https://github.com/jwilder/nginx-proxy⁠

⁠Usage

To run it:

$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t jwilder/nginx-proxy

Then start any containers you want proxied with an env var VIRTUAL_HOST=subdomain.youdomain.com

$ docker run -e VIRTUAL_HOST=foo.bar.com -t ...

Provided your DNS is setup to forward foo.bar.com to the a host running nginx-proxy, the request will be routed to a container with the VIRTUAL_HOST env var set.

⁠Multiple Ports

If your container exposes multiple ports, nginx-proxy will default to the service running on port 80. If you need to specify a different port, you can set a VIRTUAL_PORT env var to select a different one. If your container only exposes one port and it has a VIRTUAL_HOST env var set, that port will be selected.

Tag summary

Content type

Image

Digest

sha256:326bdc724…

Size

82.7 MB

Last updated

almost 11 years ago

docker pull jitta/nginx-proxy