Added Makefile and updated Dockerfile
The Dockerfile is now more like the weave one, with a scratch layer underneath. Makefile taken more or less from weave, too; except, it uses environment variables to cross-compile the binary (which should probably be done for weave as well)
This commit is contained in:
1 parent
d29781f9c2
commit
59b1db76c8
2 files changed
+25
-3
No files matched your search
@@ -0,0 +1,20 @@
|
||||
IMAGE:=/tmp/weavedns.tar
|
||||
|
||||
.DEFAULT: docker-image
|
||||
|
||||
all: docker-image
|
||||
|
||||
dns: ../*.go main.go
|
||||
go get && GOARCH=amd64 GOOS=linux go build -v
|
||||
|
||||
.PHONY: docker-image
|
||||
|
||||
docker-image: $(IMAGE)
|
||||
|
||||
$(IMAGE): Dockerfile dns
|
||||
sudo -E docker build --rm -t zettio/weavedns .
|
||||
sudo -E docker save zettio/weavedns > $(IMAGE)
|
||||
|
||||
clean:
|
||||
-sudo docker rmi zettio/weavedns
|
||||
rm -f dns $(IMAGE)
|
||||
Reference in new issue
Block a user