Skip to content

Make containers use WeaveDNS as resolver #14

@squaremo

Description

@squaremo

Harder than it sounds. There are two requirements:

  1. The plugin has to be able to put nameserver x.x.x.x in the container's /etc/resolv.conf
  2. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions