Skip to content

Commit

Permalink
Merge pull request #10135 from coolljt0725/update_link_docs
Browse files Browse the repository at this point in the history
Update the docs for --link accept container id
  • Loading branch information
Fred Lifton committed Jan 20, 2015
2 parents 7b48488 + 7503738 commit e6a70a6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/man/docker-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ IMAGE [COMMAND] [ARG...]
'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.

**--link**=[]
Add link to another container in the form of name:alias
Add link to another container in the form of <name or id>:alias

**--lxc-conf**=[]
(lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
Expand Down
2 changes: 1 addition & 1 deletion docs/man/docker-run.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ ENTRYPOINT.
'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.

**--link**=[]
Add link to another container in the form of name:alias
Add link to another container in the form of <name or id>:alias

If the operator
uses **--link** when starting the new client container, then the client
Expand Down
10 changes: 5 additions & 5 deletions docs/sources/articles/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Finally, several networking options can only be provided when calling
[Configuring DNS](#dns) and
[How Docker networks a container](#container-networking)

* `--link=CONTAINER_NAME:ALIAS` — see
* `--link=CONTAINER_NAME_or_ID:ALIAS` — see
[Configuring DNS](#dns) and
[Communication between containers](#between-containers)

Expand Down Expand Up @@ -158,10 +158,10 @@ Four different options affect container domain name services.
outside the container. It will not appear in `docker ps` nor in the
`/etc/hosts` file of any other container.

* `--link=CONTAINER_NAME:ALIAS` — using this option as you `run` a
* `--link=CONTAINER_NAME_or_ID:ALIAS` — using this option as you `run` a
container gives the new container's `/etc/hosts` an extra entry
named `ALIAS` that points to the IP address of the container named
`CONTAINER_NAME`. This lets processes inside the new container
named `ALIAS` that points to the IP address of the container identified by
`CONTAINER_NAME_or_ID`. This lets processes inside the new container
connect to the hostname `ALIAS` without having to know its IP. The
`--link=` option is discussed in more detail below, in the section
[Communication between containers](#between-containers). Because
Expand Down Expand Up @@ -284,7 +284,7 @@ If you choose the most secure setting of `--icc=false`, then how can
containers communicate in those cases where you *want* them to provide
each other services?

The answer is the `--link=CONTAINER_NAME:ALIAS` option, which was
The answer is the `--link=CONTAINER_NAME_or_ID:ALIAS` option, which was
mentioned in the previous section because of its effect upon name
services. If the Docker daemon is running with both `--icc=false` and
`--iptables=true` then, when it sees `docker run` invoked with the
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/commandline/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ Creates a new container.
--ipc="" Default is to create a private IPC namespace (POSIX SysV IPC) for the container
'container:<name|id>': reuses another container shared memory, semaphores and message queues
'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
--link=[] Add link to another container in the form of name:alias
--link=[] Add link to another container in the form of <name or id>:alias
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ or override the Dockerfile's exposed defaults:
Both hostPort and containerPort can be specified as a range of ports.
When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range. (e.g., `-p 1234-1236:1234-1236/tcp`)
(use 'docker port' to see the actual mapping)
--link="" : Add link to another container (name:alias)
--link="" : Add link to another container (<name or id>:alias)

As mentioned previously, `EXPOSE` (and `--expose`) makes ports available
**in** a container for incoming connections. The port number on the
Expand Down Expand Up @@ -595,7 +595,7 @@ above, or already defined by the developer with a Dockerfile `ENV`:

Similarly the operator can set the **hostname** with `-h`.

`--link name:alias` also sets environment variables, using the *alias* string to
`--link <name or id>:alias` also sets environment variables, using the *alias* string to
define environment variables within the container that give the IP and PORT
information for connecting to the service container. Let's imagine we have a
container running Redis:
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/userguide/dockerlinks.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Now, create a new `web` container and link it with your `db` container.
This will link the new `web` container with the `db` container you created
earlier. The `--link` flag takes the form:

--link name:alias
--link <name or id>:alias

Where `name` is the name of the container we're linking to and `alias` is an
alias for the link name. You'll see how that alias gets used shortly.
Expand Down

0 comments on commit e6a70a6

Please sign in to comment.