Skip to content
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

Add a deprecation warning about --link on default nw #4892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions docs/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The table below provides an overview of the current status of deprecated feature

| Status | Feature | Deprecated | Remove |
|------------|------------------------------------------------------------------------------------------------------------------------------------|------------|--------|
| Deprecated | [Links on the default bridge network](#links-on-the-default-bridge-network) | v26.0 | - |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm tempted to say that we deprecated it since docker 1.10 (when libnetwork was integrated in moby/moby#19198), but as we never added that to deprecated.md, perhaps instead we should add some crumble-path / references in the description below.

We can already fill in the Remove column though, at least if we plan to remove it in v28.0;

Deprecated: the feature is marked "deprecated" and should no longer be used. The feature may be removed, disabled, or change behavior in a future release. The "Deprecated" column contains the release in which the feature was marked deprecated, whereas the "Remove" column contains a tentative release in which the feature is to be removed. If no release is included in the "Remove" column, the release is yet to be decided on.

| Deprecated | [Deprecate legacy API versions](#deprecate-legacy-api-versions) | v25.0 | v26.0 |
| Deprecated | [Container short ID in network Aliases field](#container-short-id-in-network-aliases-field) | v25.0 | v26.0 |
| Deprecated | [IsAutomated field, and "is-automated" filter on docker search](#isautomated-field-and-is-automated-filter-on-docker-search) | v25.0 | v26.0 |
Expand Down Expand Up @@ -110,6 +111,18 @@ The table below provides an overview of the current status of deprecated feature
| Removed | [`--run` flag on `docker commit`](#--run-flag-on-docker-commit) | v0.10 | v1.13 |
| Removed | [Three arguments form in `docker import`](#three-arguments-form-in-docker-import) | v0.6.7 | v1.12 |

### Links on the default bridge network

**Deprecated in Release: v26.0**
**Target for Removal In Release: v28.0**

The `--link` option on `docker create` and `docker run`, when used with no
`--network` specified, is deprecated in v26.0 and will be removed in a future
release. Custom networks should be used instead.

Note that, the `--link` option is still supported when a non-default network
is used.
Comment on lines +119 to +124
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's deprecated for the default bridge, so --network bridge too. Also, once the default bridge is a normal bridge network, I think --link will work but it'll do the same as it does for other bridges? So, it's the difference in behaviour that's deprecated, rather than the option, and it probably needs a more involved description?

Maybe something like ...

When used with the default bridge network, the --link option on docker create and docker run, creates Legacy Container Links. An entry for the linked container is added to the /etc/hosts file, and the linked container's Docker originated environment variables are exposed in the new container.

When used with any any other network, the --link option simply creates a DNS alias for the linked container.

The behaviour of Legacy Container Links is deprecated in v26.0. In a future release, --link will behave in the same way for all networks.

Note that the behaviour of the --link option is unchanged when a non-default network is used.


### Deprecate legacy API versions

**Deprecated in Release: v25.0**
Expand Down
Loading