diff --git a/docs/man/docker-create.1.md b/docs/man/docker-create.1.md index 24185489f2..8a0b91f7c2 100644 --- a/docs/man/docker-create.1.md +++ b/docs/man/docker-create.1.md @@ -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 :alias **--lxc-conf**=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1" diff --git a/docs/man/docker-run.1.md b/docs/man/docker-run.1.md index b16447bc5a..53d813e802 100644 --- a/docs/man/docker-run.1.md +++ b/docs/man/docker-run.1.md @@ -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 :alias If the operator uses **--link** when starting the new client container, then the client diff --git a/docs/sources/articles/networking.md b/docs/sources/articles/networking.md index 85e6222d8a..2a0a74f953 100644 --- a/docs/sources/articles/networking.md +++ b/docs/sources/articles/networking.md @@ -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) @@ -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 @@ -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 diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index e142afde79..0565d09385 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -746,7 +746,7 @@ Creates a new container. --ipc="" Default is to create a private IPC namespace (POSIX SysV IPC) for the container 'container:': 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 :alias --lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1" -m, --memory="" Memory limit (format: , where unit = b, k, m or g) --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) diff --git a/docs/sources/reference/run.md b/docs/sources/reference/run.md index 8bf0d3633f..ca7480beb8 100644 --- a/docs/sources/reference/run.md +++ b/docs/sources/reference/run.md @@ -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 (:alias) As mentioned previously, `EXPOSE` (and `--expose`) makes ports available **in** a container for incoming connections. The port number on the @@ -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 :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: diff --git a/docs/sources/userguide/dockerlinks.md b/docs/sources/userguide/dockerlinks.md index 402c788ad4..0249e751dc 100644 --- a/docs/sources/userguide/dockerlinks.md +++ b/docs/sources/userguide/dockerlinks.md @@ -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 :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.