Since we cannot rely on containers having a docker bridge interface,
we cannot supply the docker bridge IP as a nameserver for containers.
Instead, we supply weaveDNS's weave IP address as the nameserver,
and make sure it's routable from the container; and, that the
container IPs are routable from the weaveDNS container.
This needs a couple of things to line up:
the plugin needs to know the weaveDNS address so it can supply a
static route to it; luckily, at present it is supplied by the user
to weave launch-dns, so we can just supply the same thing to the
plugin
we need to know how to route back to weave-allocated IPs from
weaveDNS; luckily, we've told weave the range on which to allocate
IPs, so we can add a route covering that.
NB We don't actually get to supply the /etc/resolv.conf to the container, so it is still necessary to include a --dns=... argument when starting a container.
Since we cannot rely on containers having a docker bridge interface, we cannot supply the docker bridge IP as a nameserver for containers.
Instead, we supply weaveDNS's weave IP address as the nameserver, and make sure it's routable from the container; and, that the container IPs are routable from the weaveDNS container.
This needs a couple of things to line up:
weave launch-dns
, so we can just supply the same thing to the pluginNB We don't actually get to supply the
/etc/resolv.conf
to the container, so it is still necessary to include a--dns=...
argument when starting a container.