mirror of https://github.com/docker/docs.git
Backport note about links being legacy (#4956)
This commit is contained in:
parent
3c3319860e
commit
26ab6617b4
|
@ -355,6 +355,9 @@ It's recommended that you use reverse-DNS notation to prevent your labels from c
|
||||||
Link to containers in another service. Either specify both the service name and
|
Link to containers in another service. Either specify both the service name and
|
||||||
a link alias (`SERVICE:ALIAS`), or just the service name.
|
a link alias (`SERVICE:ALIAS`), or just the service name.
|
||||||
|
|
||||||
|
> Links are a legacy option. We recommend using
|
||||||
|
> [networks](#networks) instead.
|
||||||
|
|
||||||
web:
|
web:
|
||||||
links:
|
links:
|
||||||
- db
|
- db
|
||||||
|
|
|
@ -702,6 +702,9 @@ It's recommended that you use reverse-DNS notation to prevent your labels from c
|
||||||
Link to containers in another service. Either specify both the service name and
|
Link to containers in another service. Either specify both the service name and
|
||||||
a link alias (`"SERVICE:ALIAS"`), or just the service name.
|
a link alias (`"SERVICE:ALIAS"`), or just the service name.
|
||||||
|
|
||||||
|
> Links are a legacy option. We recommend using
|
||||||
|
> [networks](#networks) instead.
|
||||||
|
|
||||||
web:
|
web:
|
||||||
links:
|
links:
|
||||||
- "db"
|
- "db"
|
||||||
|
|
|
@ -1007,7 +1007,7 @@ specifying both the container name and the link alias (`CONTAINER:ALIAS`).
|
||||||
>
|
>
|
||||||
> If you're using the [version 2 or above file format](compose-versioning.md#version-2), the externally-created containers
|
> If you're using the [version 2 or above file format](compose-versioning.md#version-2), the externally-created containers
|
||||||
must be connected to at least one of the same networks as the service which is
|
must be connected to at least one of the same networks as the service which is
|
||||||
linking to them. Starting with Version 2, [links](compose-file-v2#links) are a
|
linking to them. [Links](compose-file-v2#links) are a
|
||||||
legacy option. We recommend using [networks](#networks) instead.
|
legacy option. We recommend using [networks](#networks) instead.
|
||||||
>
|
>
|
||||||
> This option is ignored when [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
> This option is ignored when [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
|
||||||
|
|
Loading…
Reference in New Issue