Separated dockerising from code

This commit is contained in:
Michael Bridgen committed 2014-10-03 20:55:53 +01:00
1 parent 59b1db76c8
commit 9dcb7e2d73
3 files changed

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
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)