diff --git a/README.md b/README.md index 949a52ba..473cf951 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,9 @@ $ dig @$dns_ip +short shell1.weave ``` By default, the server will also watch docker events and remove -entries for any containers that die. +entries for any containers that die. You can tell it not to by adding +`--watch=false` to the container args: + +```bash +$ weave run 10.0.0.2/16 --name=weavedns -v /var/run/docker.sock:/var/run/docker.sock zettio/weavedns --watch=false +``` diff --git a/docker/Dockerfile b/docker/Dockerfile index 1ce7b72a..cb93e00c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,4 +2,4 @@ FROM scratch # EXPOSE 53/udp WORKDIR /home/weave ADD ./weavedns /home/weave/ -ENTRYPOINT ["/home/weave/weavedns", "-wait", "5", "-iface", "ethwe", "--watch", "--api", "unix:///var/run/docker.sock"] +ENTRYPOINT ["/home/weave/weavedns", "-wait", "5", "-iface", "ethwe"] diff --git a/main.go b/main.go index 23c2c08c..dfec361e 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,7 @@ func main() { flag.IntVar(&wait, "wait", 0, "number of seconds to wait for interface to be created and come up (defaults to 0)") flag.IntVar(&dnsPort, "dnsport", 53, "port to listen to dns requests (defaults to 53)") flag.IntVar(&httpPort, "httpport", 6785, "port to listen to HTTP requests (defaults to 6785)") - flag.BoolVar(&watch, "watch", false, "watch the docker socket for container events") + flag.BoolVar(&watch, "watch", true, "watch the docker socket for container events") flag.Parse() var zone = new(weavedns.ZoneDb)