-
Notifications
You must be signed in to change notification settings - Fork 738
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
All 'containers' have the same IP #3
Comments
You're right. Ideally I don't want to have to keep track of state, or run a DHCP server. I think the best way to deal with this is to have unique IP and MAC addresses deterministically generated from the container IDs. |
Yeah, I was thinking about that. You could try generating them sequentially, but if you need to wrap (there are only ~250 addresses in the default bridge network) then you have to check which addresses are free. |
It looks like I need to solve or at least work around #10 before fixing this. Currently there are 89999 possible UUIDs so conflicts are fairly rare. If we go for deterministically generated IPs and limit ourselves to a maximum of 253 containers (a fair limit imo) the odds of conflicts go way up. |
This would prevent you from running two webservers on port 80, for instance. If doing dhcp isn't possible, the next best thing would be to maintain a list of currently used IPs.
The text was updated successfully, but these errors were encountered: