Skip to content

Commit 26ab661

Browse files
author
Misty Stanley-Jones
authored
Backport note about links being legacy (docker#4956)
1 parent 3c33198 commit 26ab661

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

compose/compose-file/compose-file-v1.md

+3
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ It's recommended that you use reverse-DNS notation to prevent your labels from c
355355
Link to containers in another service. Either specify both the service name and
356356
a link alias (`SERVICE:ALIAS`), or just the service name.
357357

358+
> Links are a legacy option. We recommend using
359+
> [networks](#networks) instead.
360+
358361
web:
359362
links:
360363
- db

compose/compose-file/compose-file-v2.md

+3
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,9 @@ It's recommended that you use reverse-DNS notation to prevent your labels from c
702702
Link to containers in another service. Either specify both the service name and
703703
a link alias (`"SERVICE:ALIAS"`), or just the service name.
704704

705+
> Links are a legacy option. We recommend using
706+
> [networks](#networks) instead.
707+
705708
web:
706709
links:
707710
- "db"

compose/compose-file/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ specifying both the container name and the link alias (`CONTAINER:ALIAS`).
10071007
>
10081008
> If you're using the [version 2 or above file format](compose-versioning.md#version-2), the externally-created containers
10091009
must be connected to at least one of the same networks as the service which is
1010-
linking to them. Starting with Version 2, [links](compose-file-v2#links) are a
1010+
linking to them. [Links](compose-file-v2#links) are a
10111011
legacy option. We recommend using [networks](#networks) instead.
10121012
>
10131013
> This option is ignored when [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)

0 commit comments

Comments
 (0)