This is a two part proposal. Please see #7467 for the other part.
Problem
Links currently do not satisfy the needs of users for a couple of reasons:
- linking is static: you cannot change the associations links provide without destroying (at least one) container
- docker’s links system externally does not provide an elegant UI to manipulating and querying links
Solution:
- Provide new
docker links UI
- Provide guarantees about what happens when a link is added or removed
New docker links UI
Four new inferior commands will be added under the new subcommand docker links
docker links list - list the existing links, and the state of the linked containers
docker links add <consumer> <producer> <name> - add a link to existing containers
docker links remove <name> - remove a link from existing containers
docker links move <name> <producer2> - to migrate a set of links from one container to another
Links Guarantees
We should guarantee that:
- Adding a link should:
- rewrite the hosts files for all linked resources with updated content
- expose the ports described in the Dockerfile
- Removing a link should:
- rewrite the hosts files for all linked resources with updated content
- tear down the exposed ports brought by
docker links add
Tickets Resolved:
#5186
#2733
#3285
#3155
#2658
#2588 (I think)
This is a two part proposal. Please see #7467 for the other part.
Problem
Links currently do not satisfy the needs of users for a couple of reasons:
Solution:
docker linksUINew
docker linksUIFour new inferior commands will be added under the new subcommand
docker linksdocker links list- list the existing links, and the state of the linked containersdocker links add <consumer> <producer> <name>- add a link to existing containersdocker links remove <name>- remove a link from existing containersdocker links move <name> <producer2>- to migrate a set of links from one container to anotherLinks Guarantees
We should guarantee that:
docker links addTickets Resolved:
#5186
#2733
#3285
#3155
#2658
#2588 (I think)