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

[Feature Request] Sticky ip for containers #37634

Open
zentarim opened this issue Aug 14, 2018 · 0 comments
Open

[Feature Request] Sticky ip for containers #37634

zentarim opened this issue Aug 14, 2018 · 0 comments

Comments

@zentarim
Copy link

zentarim commented Aug 14, 2018

Description:
At now, we have abilities:

  • Assign static IP to container
    or
  • Assign dynamic IP to container
    But we not have ability:
  • Allocate 'sticky' address from dynamic pool\subnet. i.e. dynamic address, tied to container until container removal.
    Something like
host SOMEHOST {
hardware ethernet 00:1F:6A:21:71:3F;
fixed-address 10.0.0.1;
}

in isc-dhcpd

Use case:
Docker uses in many test environments. Sometimes, you need to create dozens of container, tied with dozens of nets.
It is very convenient to do this topologies automatically with dynamic addresses.
But, due the test cases, some containers can be started\stopped in random order. Also several containers in one network can be stopped and runned in random order.
This implies changes of ip address in containers. And this is a key problem, because not all software can dynamically adjust their configs in this situation.
Creation of similar topologies with static config is tremendously painful, and described ability can help.

Proposal:
Add parameter --sticky for 'docker network connect' command (or allow empty --ip parameter).
It woud give ability to automatic assign static address to docker. This address will be considered as allocated to this container until container removal, even this container is stopped,

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants