At present the driver is not told either of the containerID or the hostname, so it is more or less impossible in remote driver terms to register containers with weaveDNS. I've filed moby/libnetwork#234 to try and remedy the situation.
Another solution might be to watch the docker event stream for containers starting, and inspect them for weave endpoints. Of course, one problem there is that adding an endpoint to a container after the fact will not get reported in the event stream.
Once we know about a container, though, we can look it up by its SandboxKey, so perhaps that will be helpful; however, a container is not given a sandbox key until it is started.
At present the driver is not told either of the containerID or the hostname, so it is more or less impossible in remote driver terms to register containers with weaveDNS. I've filed moby/libnetwork#234 to try and remedy the situation.
Another solution might be to watch the docker event stream for containers starting, and inspect them for weave endpoints. Of course, one problem there is that adding an endpoint to a container after the fact will not get reported in the event stream.
Once we know about a container, though, we can look it up by its SandboxKey, so perhaps that will be helpful; however, a container is not given a sandbox key until it is started.