Update the docs for --link accept container id
| ... | ... |
@@ -102,7 +102,7 @@ IMAGE [COMMAND] [ARG...] |
| 102 | 102 |
'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. |
| 103 | 103 |
|
| 104 | 104 |
**--link**=[] |
| 105 |
- Add link to another container in the form of name:alias |
|
| 105 |
+ Add link to another container in the form of <name or id>:alias |
|
| 106 | 106 |
|
| 107 | 107 |
**--lxc-conf**=[] |
| 108 | 108 |
(lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1" |
| ... | ... |
@@ -170,7 +170,7 @@ ENTRYPOINT. |
| 170 | 170 |
'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. |
| 171 | 171 |
|
| 172 | 172 |
**--link**=[] |
| 173 |
- Add link to another container in the form of name:alias |
|
| 173 |
+ Add link to another container in the form of <name or id>:alias |
|
| 174 | 174 |
|
| 175 | 175 |
If the operator |
| 176 | 176 |
uses **--link** when starting the new client container, then the client |
| ... | ... |
@@ -105,7 +105,7 @@ Finally, several networking options can only be provided when calling |
| 105 | 105 |
[Configuring DNS](#dns) and |
| 106 | 106 |
[How Docker networks a container](#container-networking) |
| 107 | 107 |
|
| 108 |
- * `--link=CONTAINER_NAME:ALIAS` — see |
|
| 108 |
+ * `--link=CONTAINER_NAME_or_ID:ALIAS` — see |
|
| 109 | 109 |
[Configuring DNS](#dns) and |
| 110 | 110 |
[Communication between containers](#between-containers) |
| 111 | 111 |
|
| ... | ... |
@@ -158,10 +158,10 @@ Four different options affect container domain name services. |
| 158 | 158 |
outside the container. It will not appear in `docker ps` nor in the |
| 159 | 159 |
`/etc/hosts` file of any other container. |
| 160 | 160 |
|
| 161 |
- * `--link=CONTAINER_NAME:ALIAS` — using this option as you `run` a |
|
| 161 |
+ * `--link=CONTAINER_NAME_or_ID:ALIAS` — using this option as you `run` a |
|
| 162 | 162 |
container gives the new container's `/etc/hosts` an extra entry |
| 163 |
- named `ALIAS` that points to the IP address of the container named |
|
| 164 |
- `CONTAINER_NAME`. This lets processes inside the new container |
|
| 163 |
+ named `ALIAS` that points to the IP address of the container identified by |
|
| 164 |
+ `CONTAINER_NAME_or_ID`. This lets processes inside the new container |
|
| 165 | 165 |
connect to the hostname `ALIAS` without having to know its IP. The |
| 166 | 166 |
`--link=` option is discussed in more detail below, in the section |
| 167 | 167 |
[Communication between containers](#between-containers). Because |
| ... | ... |
@@ -284,7 +284,7 @@ If you choose the most secure setting of `--icc=false`, then how can |
| 284 | 284 |
containers communicate in those cases where you *want* them to provide |
| 285 | 285 |
each other services? |
| 286 | 286 |
|
| 287 |
-The answer is the `--link=CONTAINER_NAME:ALIAS` option, which was |
|
| 287 |
+The answer is the `--link=CONTAINER_NAME_or_ID:ALIAS` option, which was |
|
| 288 | 288 |
mentioned in the previous section because of its effect upon name |
| 289 | 289 |
services. If the Docker daemon is running with both `--icc=false` and |
| 290 | 290 |
`--iptables=true` then, when it sees `docker run` invoked with the |
| ... | ... |
@@ -746,7 +746,7 @@ Creates a new container. |
| 746 | 746 |
--ipc="" Default is to create a private IPC namespace (POSIX SysV IPC) for the container |
| 747 | 747 |
'container:<name|id>': reuses another container shared memory, semaphores and message queues |
| 748 | 748 |
'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. |
| 749 |
- --link=[] Add link to another container in the form of name:alias |
|
| 749 |
+ --link=[] Add link to another container in the form of <name or id>:alias |
|
| 750 | 750 |
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1" |
| 751 | 751 |
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g) |
| 752 | 752 |
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) |
| ... | ... |
@@ -512,7 +512,7 @@ or override the Dockerfile's exposed defaults: |
| 512 | 512 |
Both hostPort and containerPort can be specified as a range of ports. |
| 513 | 513 |
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`) |
| 514 | 514 |
(use 'docker port' to see the actual mapping) |
| 515 |
- --link="" : Add link to another container (name:alias) |
|
| 515 |
+ --link="" : Add link to another container (<name or id>:alias) |
|
| 516 | 516 |
|
| 517 | 517 |
As mentioned previously, `EXPOSE` (and `--expose`) makes ports available |
| 518 | 518 |
**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`: |
| 595 | 595 |
|
| 596 | 596 |
Similarly the operator can set the **hostname** with `-h`. |
| 597 | 597 |
|
| 598 |
-`--link name:alias` also sets environment variables, using the *alias* string to |
|
| 598 |
+`--link <name or id>:alias` also sets environment variables, using the *alias* string to |
|
| 599 | 599 |
define environment variables within the container that give the IP and PORT |
| 600 | 600 |
information for connecting to the service container. Let's imagine we have a |
| 601 | 601 |
container running Redis: |
| ... | ... |
@@ -146,7 +146,7 @@ Now, create a new `web` container and link it with your `db` container. |
| 146 | 146 |
This will link the new `web` container with the `db` container you created |
| 147 | 147 |
earlier. The `--link` flag takes the form: |
| 148 | 148 |
|
| 149 |
- --link name:alias |
|
| 149 |
+ --link <name or id>:alias |
|
| 150 | 150 |
|
| 151 | 151 |
Where `name` is the name of the container we're linking to and `alias` is an |
| 152 | 152 |
alias for the link name. You'll see how that alias gets used shortly. |