-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Harder than it sounds. There are two requirements:
- The plugin has to be able to put
nameserver x.x.x.x
in the container's/etc/resolv.conf
- The container has to be able to reach
x.x.x.x
.
At the minute, there's no provision for a libnetwork driver to do anything with /etc/resolv.conf
-- or rather, there is a field in the driverapi, but no machinery to do anything with it. moby/libnetwork#212 may fix this in part, if it lands and gets things right. (Currently it attributes primacy to an endpoint, regardless of where it is used; rather, it should nominate a primary endpoint for each sandbox. But then, what happens when you remove that endpoint? Who knows)
The second problem is perhaps more tricky, since it requires the container to have another interface on which to talk to weaveDNS (or, for weaveDNS to operate differently. Somehow.)
There is one clear alternative here: using another bridge device, on which weaveDNS listens, and on which each container is given an interface. This would require the recapitulation of the libnetwork bridge driver (allocating IPs and so on).