simple docker image use nginx as proxy to your running container
356
nginx-proxy is a simple nginx container acting as proxy server to your running container (do not use in production)
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
proxy.confexample.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.
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
Content type
Image
Digest
sha256:a4e4039b2…
Size
25.5 MB
Last updated
over 10 years ago
docker pull ball6847/nginx-proxy