-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
base: master
Are you sure you want to change the base?
Add a deprecation warning about --link on default nw #4892
Conversation
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
665a22f
to
ad19553
Compare
Codecov Report
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 |
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. |
There was a problem hiding this comment.
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 ondocker create
anddocker 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 | - | |
There was a problem hiding this comment.
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.
Related to:
- What I did
Update the "Deprecated Engine Features" doc page.