-
Notifications
You must be signed in to change notification settings - Fork 670
Expose weave network to docker inspect #117
Comments
Why? (I can think of some reasons, but would rather hear them from you)
I don't think |
Using it is slightly easier than shell'ing out to the container and running ifconfig or ip. Many folks do not install an sshd daemon on their containers and so must It would be convenient. This data structure: "NetworkSettings": { "Bridge": "docker0", "Gateway": "172.17.42.1", "IPAddress": "172.17.0.33", "IPPrefixLen": 16, "PortMapping": null, "Ports": {} }, ought to be an array of interfaces, rather than simply reporting on the docker bridge. And doing so would support things I'd like to do to expose network data about containers as facter facts on both the container and on the docker host. Just off the top of my head. -- Hugh |
Docker lacks support for this at the moment, as far as I can tell... However, I had been looking at how to make Docker use Weave's bridge, that way Docker allocates IPs and will thereby tell IP of the container which is on the Weave network. the only issue with this approach is that it ends up using subnet-per-host model, rather then per application... |
That's a big deal. |
FYI, there appear to be forks of libcontainer that implement support for multiple network interfaces... e.g. ajwdev/libcontainer@d486ac7 and MalteJ/libcontainer@7742859, but I'm not sure whether this will make it upstream anytime soon. |
moby/moby#9013 is designed to fix that. |
Container labels, introduced in docker 1.6, allow us to add weave IPs to container meta data. But only on container creation, since, unlike moby/moby#9013, they can only be set then and are immutable. A weave docker network plugins might also give us this functionality, depending on what, if anything, gets placed into the container metadata (or other data retrievable via the docker remote api) by the network plugin mechanism. |
A user (via IRC) tells us they do the 'docker-uses-weave-bridge' thing to get the weave IP to show up in |
Did they say why they are doing that? In particular, why would |
They mentioned "configurator+consul" using the |
Hmm. Can't see it in the code, though I didn't look very hard. If true I suspect these would work only if the weave IP replaced the docker IP in the result of |
Hi there, Similar probem here. I am using registrator for storing the container (weave) ips into consul. When using the weave bridge as the default docker bridge it just work as expected but as per https://github.com/gliderlabs/registrator/blob/583c5bd34a15c2c90448b26a3cf17188691c0cbc/bridge/util.go#L72 it won't work when weave generating ethw as "container.NetworkSettings.IPAddress" still will be the docker0 bridge ip. So ideally?:
I am guessing this woudln't be a problem if libnetwork plugins become stable? |
I believe that the zettio-weave project needs to sort out how to use its run, attach and detach subcommands to inject and maintain information about the weave bridge into the docker inspect output.
https://github.com/hesco/hesco-weave#to-do-tasks-for-other-projects
The text was updated successfully, but these errors were encountered: