Skip to content

Backport note about links being legacy #4956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compose/compose-file/compose-file-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
a link alias (`SERVICE:ALIAS`), or just the service name.

> Links are a legacy option. We recommend using
> [networks](#networks) instead.

web:
links:
- db
Expand Down
3 changes: 3 additions & 0 deletions compose/compose-file/compose-file-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
a link alias (`"SERVICE:ALIAS"`), or just the service name.

> Links are a legacy option. We recommend using
> [networks](#networks) instead.

web:
links:
- "db"
Expand Down
2 changes: 1 addition & 1 deletion compose/compose-file/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.
>
> This option is ignored when [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
Expand Down