Skip to content

Commit

Permalink
Merge pull request moby#10170 from thaJeztah/docs-note-environment-vars
Browse files Browse the repository at this point in the history
Document that ENV vars are not automatically updated
  • Loading branch information
SvenDowideit committed Jan 20, 2015
2 parents e08858a + 3fb06dc commit 04d1b93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/sources/reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,12 @@ mechanism to communicate with a linked container by its alias:
If you restart the source container (`servicename` in this case), the recipient
container's `/etc/hosts` entry will be automatically updated.

> **Note**:
> Unlike host entries in the `/ets/hosts` file, IP addresses stored in the
> environment variables are not automatically updated if the source container is
> restarted. We recommend using the host entries in `/etc/hosts` to resolve the
> IP address of linked containers.
## VOLUME (shared filesystems)

-v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro].
Expand Down
6 changes: 6 additions & 0 deletions docs/sources/userguide/dockerlinks.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ command to list the specified container's environment variables.
> container. Similarly, some daemons (such as `sshd`)
> will scrub them when spawning shells for connection.
> **Note**:
> Unlike host entries in the [`/ets/hosts` file](#updating-the-etchosts-file),
> IP addresses stored in the environment variables are not automatically updated
> if the source container is restarted. We recommend using the host entries in
> `/etc/hosts` to resolve the IP address of linked containers.
You can see that Docker has created a series of environment variables with
useful information about the source `db` container. Each variable is prefixed with
`DB_`, which is populated from the `alias` you specified above. If the `alias`
Expand Down

0 comments on commit 04d1b93

Please sign in to comment.