mirror of https://github.com/docker/docs.git
Update service-links.md (#2529)
This commit is contained in:
parent
76a9be1e29
commit
64e6512bf3
|
@ -96,7 +96,7 @@ functionality using directional links recorded in environment variables.
|
|||
When you link a "client" service to a "server" service, Docker Cloud performs
|
||||
the following actions on the "client" service:
|
||||
|
||||
1. Creates a group of environment variables that contain information about the exposed ports of the "server" service, including its IP address, port and protocol.
|
||||
1. Creates a group of environment variables that contain information about the exposed ports of the "server" service, including its IP address, port, and protocol.
|
||||
|
||||
2. Copies all of the "server" service environment variables to the "client" service with an `HOSTNAME_ENV_` prefix.
|
||||
|
||||
|
@ -164,7 +164,7 @@ This example snippet creates a directional link from `my-proxy` to `my-web-app`,
|
|||
|
||||
### DNS hostnames vs service links
|
||||
|
||||
> **Note**: Hostnames are updated during runtime if the service scales up or down. Environment variables are only set or updated at deploy or redeploy. If your services will scale up or down frequently, you should use hostnames rather than service links.
|
||||
> **Note**: Hostnames are updated during runtime if the service scales up or down. Environment variables are only set or updated at deploy or redeploy. If your services will scale up or down frequently, you should use hostnames rather than service links.
|
||||
|
||||
In the example, the `my-proxy` containers can access the service links using following hostnames:
|
||||
|
||||
|
|
Loading…
Reference in New Issue