diff --git a/.gitignore b/.gitignore index 3881ffc48..0e2686320 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ prog/scope docker/scope docker/docker.tgz docker/weave +docker/weaveutil docker/runsvinit extras/fixprobe/fixprobe extras/fixprobe/*.json diff --git a/Makefile b/Makefile index 1d50d1626..d8b542528 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ SCOPE_UI_BUILD_UPTODATE=.scope_ui_build.uptodate SCOPE_BACKEND_BUILD_IMAGE=$(DOCKERHUB_USER)/scope-backend-build SCOPE_BACKEND_BUILD_UPTODATE=.scope_backend_build.uptodate SCOPE_VERSION=$(shell git rev-parse --short HEAD) +WEAVENET_VERSION=1.9.0 DOCKER_VERSION=1.10.3 DOCKER_DISTRIB=.pkg/docker-$(DOCKER_VERSION).tgz DOCKER_DISTRIB_URL=https://get.docker.com/builds/Linux/x86_64/docker-$(DOCKER_VERSION).tgz @@ -38,10 +39,14 @@ $(DOCKER_DISTRIB): curl -o $(DOCKER_DISTRIB) $(DOCKER_DISTRIB_URL) docker/weave: - curl -L git.io/weave -o docker/weave + curl -L https://github.com/weaveworks/weave/releases/download/v$(WEAVENET_VERSION)/weave -o docker/weave chmod u+x docker/weave -$(SCOPE_EXPORT): $(SCOPE_EXE) $(DOCKER_DISTRIB) docker/weave $(RUNSVINIT) docker/Dockerfile docker/demo.json docker/run-app docker/run-probe docker/entrypoint.sh +docker/weaveutil: + $(SUDO) docker run --rm --entrypoint=cat weaveworks/weaveexec:$(WEAVENET_VERSION) /usr/bin/weaveutil > $@ + chmod +x $@ + +$(SCOPE_EXPORT): $(SCOPE_EXE) $(DOCKER_DISTRIB) docker/weave docker/weaveutil $(RUNSVINIT) docker/Dockerfile docker/demo.json docker/run-app docker/run-probe docker/entrypoint.sh cp $(SCOPE_EXE) $(RUNSVINIT) docker/ cp $(DOCKER_DISTRIB) docker/docker.tgz $(SUDO) docker build -t $(SCOPE_IMAGE) docker/ diff --git a/docker/Dockerfile b/docker/Dockerfile index a6d31a75b..2b16eb272 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,7 +6,7 @@ RUN apk add --update bash runit conntrack-tools iproute2 util-linux curl && \ rm -rf /var/cache/apk/* ADD ./docker.tgz / ADD ./demo.json / -ADD ./weave /usr/bin/ +ADD ./weave ./weaveutil /usr/bin/ COPY ./scope ./runsvinit ./entrypoint.sh /home/weave/ COPY ./run-app /etc/service/app/run COPY ./run-probe /etc/service/probe/run