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:
Michael Bridgen committed 2014-10-03 20:08:32 +01:00
1 parent d29781f9c2
commit 59b1db76c8
2 files changed
+25 -3

No files matched your search

+5 -3
View File
@@ -1,3 +1,5 @@
FROM ubuntu
EXPOSE 53/udp
ADD ./dns /home/dns
FROM scratch
# EXPOSE 53/udp
WORKDIR /home/weave
ADD ./dns /home/weave/weavedns
ENTRYPOINT ["/home/weave/weavedns"]
+20
View File
@@ -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)