mirror of https://github.com/docker/cli.git
Allow links to be specified with only the name if this matches the alias
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
This commit is contained in:
parent
ed206bfca4
commit
313659dd18
|
@ -2138,6 +2138,12 @@ Guide.
|
||||||
The `--link` flag will link the container named `/redis` into the newly
|
The `--link` flag will link the container named `/redis` into the newly
|
||||||
created container with the alias `redis`. The new container can access the
|
created container with the alias `redis`. The new container can access the
|
||||||
network and environment of the `redis` container via environment variables.
|
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
|
The `--name` flag will assign the name `console` to the newly created
|
||||||
container.
|
container.
|
||||||
|
|
||||||
|
|
|
@ -942,7 +942,7 @@ or override the Dockerfile's exposed defaults:
|
||||||
Both hostPort and containerPort can be specified as a range of ports.
|
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`)
|
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)
|
(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
|
As mentioned previously, `EXPOSE` (and `--expose`) makes ports available
|
||||||
**in** a container for incoming connections. The port number on the
|
**in** a container for incoming connections. The port number on the
|
||||||
|
|
Loading…
Reference in New Issue