Allow links to be specified with only the name if this matches the alias

Signed-off-by: Antonio Murdaca <me@runcom.ninja>
master
Antonio Murdaca 2015-05-07 22:02:14 +02:00 committed by Tibor Vass
parent ed206bfca4
commit 313659dd18
2 changed files with 7 additions and 1 deletions

View File

@ -2138,6 +2138,12 @@ Guide.
The `--link` flag will link the container named `/redis` into the newly
created container with the alias `redis`. The new container can access the
network and environment of the `redis` container via environment variables.
The `--link` flag will also just accept the form `<name or id>` in which case
the alias will match the name. For instance, you could have written the previous
example as:
$ docker run --link redis --name console ubuntu bash
The `--name` flag will assign the name `console` to the newly created
container.

View File

@ -942,7 +942,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 or id>:alias)
--link="" : Add link to another container (<name or id>:alias or <name or id>)
As mentioned previously, `EXPOSE` (and `--expose`) makes ports available
**in** a container for incoming connections. The port number on the