improved formatting

This commit is contained in:
Joachim Lusiardi 2015-02-19 19:30:59 +01:00
parent a0c246169c
commit e8b8646a4e
1 changed files with 11 additions and 7 deletions

View File

@ -21,12 +21,14 @@ moment, only access via UNIX socket ist possible. Because of that, the socket ha
into the container (*-v /var/run/docker.sock:/var/run/docker.sock*). into the container (*-v /var/run/docker.sock:/var/run/docker.sock*).
### Single IP / All IPs ### Single IP / All IPs
This option is used if your Docker Host has only one IP or if there is no need to differentiate between different IPs regarding wether a Web App is available on it. This option is used if your Docker Host has only one IP or if there is no need to differentiate between different IPs regarding wether a Web App
is available on it.
Run the container like this: Run the container like this:
`docker run --name auto_proxy -d -v /var/run/docker.sock:/var/run/docker.sock -p 80:80 docker_nginx_auto_proxy` `docker run --name auto_proxy -d -v /var/run/docker.sock:/var/run/docker.sock -p 80:80 docker_nginx_auto_proxy`
That means that the container exposes all Wep Apps on all IPs. Do **not** use the *ip* option from above on the target containers. The *PROXY_DATA* environment variables would be something like: That means that the container exposes all Wep Apps on all IPs. Do **not** use the *ip* option from above on the target containers. The *PROXY_DATA* environment variables would be something like
`PROXY_DATA=server_name:cooldomain.test.com,port:8080,location=/webApp` `PROXY_DATA=server_name:cooldomain.test.com,port:8080,location=/webApp`
### Multiple IPs ### Multiple IPs
@ -34,9 +36,11 @@ This option is used if your Docker Host has multiple IPs (perhaps a public IP in
One container must be started for each IP that should host Web Apps. For example, if there is a public IP of 1.2.3.4 and a private IP 10.1.2.3, then 2 Containers would be started: One container must be started for each IP that should host Web Apps. For example, if there is a public IP of 1.2.3.4 and a private IP 10.1.2.3, then 2 Containers would be started:
`docker run --name auto_proxy_public -d -v /var/run/docker.sock:/var/run/docker.sock -p 1.2.3.4:80:80 docker_nginx_auto_proxy` `docker run --name auto_proxy_public -d -v /var/run/docker.sock:/var/run/docker.sock -p 1.2.3.4:80:80 docker_nginx_auto_proxy`
`docker run --name auto_proxy_private -d -v /var/run/docker.sock:/var/run/docker.sock -p 10.1.2.3:80:80 docker_nginx_auto_proxy `docker run --name auto_proxy_private -d -v /var/run/docker.sock:/var/run/docker.sock -p 10.1.2.3:80:80 docker_nginx_auto_proxy`
`
If a target container does **not** have the *ip* option set, it listens on **all** IP adresses and will be handled by both containers. If a container uses, e.g. If a target container does **not** have the *ip* option set, it listens on **all** IP adresses and will be handled by both containers.
`PROXY_DATA=server_name:cooldomain.test.com,port:8080,location=/webApp,ip=10.1.2.3` If a container uses, e.g.,
Then it will be only available on the private 10.1.2.3 IP (perhaps using a VPN). `PROXY_DATA=server_name:cooldomain.test.com,port:8080,location=/webApp,ip=10.1.2.3`
then it will be only available on the private 10.1.2.3 IP (perhaps using a VPN).