While we're only reacting to containers going away, it's more convenient to bundle the docker events watcher into the server. I've added a flag to switch it on; and switched it on by default in the container. I also implemented `Zone.DeleteRecordsFor(ident)`, which removes all records for a particular container. One minor change to the structure of the code is that the Zone is now constructed *outside* the server, and given to it and the updater.
20 lines
458 B
Makefile
20 lines
458 B
Makefile
.DEFAULT: all
|
|
|
|
all: server-image
|
|
|
|
weavedns: ../server/*.go ../main.go
|
|
go get -tags netgo ../ && go build -tags netgo -ldflags '-linkmode external -extldflags "-static"' -o $@ -v ../
|
|
|
|
.PHONY: server-image
|
|
|
|
server-image: /var/tmp/weavedns.tar
|
|
|
|
/var/tmp/weavedns.tar: Dockerfile weavedns
|
|
sudo -E docker build -t zettio/weavedns .
|
|
sudo -E docker save zettio/weavedns > $@
|
|
|
|
clean:
|
|
-sudo docker rmi zettio/weavedns
|
|
rm -f weavedns
|
|
rm -f /var/tmp/weavedns.tar
|