mirror of
https://github.com/docker/cli.git
synced 2026-01-18 08:21:31 +03:00
Allow links to be specified with only the name if this matches the alias
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 313659dd18
Component: cli
This commit is contained in:
committed by
Tibor Vass
parent
1ad8193325
commit
e8a925c579
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user