Add a deprecation warning about --link on default nw#4892
Add a deprecation warning about --link on default nw#4892akerouanton wants to merge 1 commit intodocker:masterfrom
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.
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
--linkoption ondocker createanddocker run, creates Legacy Container Links. An entry for the linked container is added to the/etc/hostsfile, and the linked container's Docker originated environment variables are exposed in the new container.When used with any any other network, the
--linkoption simply creates a DNS alias for the linked container.The behaviour of Legacy Container Links is deprecated in v26.0. In a future release,
--linkwill behave in the same way for all networks.Note that the behaviour of the
--linkoption is unchanged when a non-default network is used.
|
|
||
| | 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.
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.