--link is legacy container

Hi,

Learning Dockers and it’s given --link is a legacy now (Legacy container links | Docker Docs) when this will be removed and we’ll learn the new technology?

https://learn.kodekloud.com/user/courses/docker-training-course-for-the-absolute-beginner/module/e4f7711c-d82a-4953-ab4c-bce10b901ed9/lesson/c1f5ae37-0af8-4709-a6ab-9f75985df16d?autoplay=true

–link is legacy but has not yet been removed. There is no information on when it will be removed.
Docker has replaced the --link flag with networks, enabling containers to communicate directly using DNS-based service discovery.
You can read more here:
Networking overview | Docker Docs

The --link flag is a legacy feature of Docker. It may eventually be removed. Unless you absolutely need to continue using it, we recommend that you use user-defined networks to facilitate communication between two containers instead of using --link .

If I’m not remembering wrong a good reason to use docker and not Kubernetes is because docker by default enable the dns server to facilitate communication between containers, in Kubernetes is a bit more complex, but you can modify the dns and the load balancer as you like. If I’m not wrong the “user-defined networks” is very straight foward to use in docker, is like you almost don’t need to touch it (If I’m not wrong, I never use docker swarm, but I get the idea and know a little). So maybe you don’t need to worry to much about the “new technology” because in many cases you are already using it.

So long story short:

Docker: Hi I’m ready to go or almost, please don’t try to change the config files unless you really know what are you doing.

Kubernetes: Here are some objects, have some fun and create something usefull.

Hope this helps you @altugozgercek

1 Like