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

Conversation

akerouanton
Copy link
Member

Related to:

- What I did

Update the "Deprecated Engine Features" doc page.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
@akerouanton akerouanton force-pushed the deprecated-links-on-default-network branch from 665a22f to ad19553 Compare February 22, 2024 11:21
@codecov-commenter
Copy link

Codecov Report

Merging #4892 (ad19553) into master (f2e98f9) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4892   +/-   ##
=======================================
  Coverage   61.31%   61.32%           
=======================================
  Files         287      287           
  Lines       20063    20063           
=======================================
+ Hits        12301    12303    +2     
+ Misses       6868     6867    -1     
+ Partials      894      893    -1     

Comment on lines +119 to +124
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.
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.

@@ -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.

@vvoland vvoland modified the milestones: 26.0.0, 27.0.0 Mar 14, 2024
@neersighted neersighted modified the milestones: 27.0.0, v-future May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants