Skip to content

docker container changes ip upon restart #2801

Closed
@kiorky

Description

I used to have a docker version (maybe 0.6.2->0.6.5) where ip of a specific container stayed the same upon restarts.

Now, with 0.6.6, the ip changes at each container restart, is it a feature or a regression ?

/cc @jpetazzo

CC from my email on docker dev :
We have had some recent threads about docker networking support and today Jamshid Afshar started another related thread with the same problematic users already have.

From my humble point of experimentations:
Today:

  • At each restart containers ip change.
  • Docker applies rules on the fly, and cannot have a way to reconfigure network mapping rules (PAT) on demand.

Those are big stoppers for other tools integration like shorewall which for example:

  • Does not support PAT rules with hostname/dns inside
  • Does not support custom named chains unless you write some perl. Personally, Perl is not my cup of tea.
  • My solution as of now is to write some scripts to save/reload the docker conf, see http://www.shorewall.net/shorewall_extension_scripts.htm. Idea is to save docker chains and restore them at different stages of the shorewall starting process.
  • In other words, without care if shorewall (re)starts after docker, it kills the docker networking.

A reliable and predictable ip (re)configuration system is a musthave feature i think.

  • In an ideal world, we can have a way to statically assign ourselves the ip addresses of the containers.
  • And more generally, in any case, we must have a way to tell docker to (re)configure its networking mappings & rules without restarting the whole docker daemon & containers (reapply the docker rules & postrouting stuff). This would prevent to write unreliable & prone to errors cruft in other tools to save/restore docker stuff.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    area/networkingexp/expertkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions