From 520c54f8dad1dad3c72319292fd5e540821e8a99 Mon Sep 17 00:00:00 2001 From: Michael Bridgen Date: Wed, 18 Mar 2015 12:08:35 +0000 Subject: [PATCH] Use a fixed (and old) version of the docker client As noted in #388 comment 76958961, we need the docker client to be as old as possible while supporting what weave needs to do. At the minute that means version 1.3.1. The `apk` package index does not have old versions of docker, so the most direct way of getting a docker executable is to download the specific version from https://get.docker.com. --- .gitignore | 1 + Makefile | 10 +++++++++- weaveexec/Dockerfile | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index be4346d1..2fd760f9 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ releases weave.tar weavedns.tar weaveexec.tar +weaveexec/docker*.tgz diff --git a/Makefile b/Makefile index c92ae8f6..c9f0365b 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,10 @@ WEAVER_EXPORT=weave.tar WEAVEDNS_EXPORT=weavedns.tar WEAVEEXEC_EXPORT=weaveexec.tar +WEAVEEXEC_DOCKER_VERSION=1.3.1 +DOCKER_DISTRIB=weaveexec/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz +DOCKER_DISTRIB_URL=https://get.docker.com/builds/Linux/x86_64/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz + all: $(WEAVER_EXPORT) $(WEAVEDNS_EXPORT) $(WEAVEEXEC_EXPORT) update: @@ -45,11 +49,15 @@ $(WEAVEDNS_EXPORT): weavedns/Dockerfile $(WEAVEDNS_EXE) $(SUDO) docker build -t $(WEAVEDNS_IMAGE) weavedns $(SUDO) docker save $(WEAVEDNS_IMAGE):latest > $@ -$(WEAVEEXEC_EXPORT): weaveexec/Dockerfile weave +$(WEAVEEXEC_EXPORT): weaveexec/Dockerfile $(DOCKER_DISTRIB) weave cp weave weaveexec/weave + cp $(DOCKER_DISTRIB) weaveexec/docker.tgz $(SUDO) docker build -t $(WEAVEEXEC_IMAGE) weaveexec $(SUDO) docker save $(WEAVEEXEC_IMAGE):latest > $@ +$(DOCKER_DISTRIB): + curl -o $(DOCKER_DISTRIB) $(DOCKER_DISTRIB_URL) + # Add more directories in here as more tests are created tests: cd router; go test -cover -tags netgo diff --git a/weaveexec/Dockerfile b/weaveexec/Dockerfile index abae662e..408b3a75 100644 --- a/weaveexec/Dockerfile +++ b/weaveexec/Dockerfile @@ -1,7 +1,8 @@ FROM gliderlabs/alpine MAINTAINER Weaveworks Inc WORKDIR /home/weave -RUN ["apk", "add", "--update", "ethtool", "conntrack-tools", "curl", "iptables", "iproute2", "docker"] +RUN ["apk", "add", "--update", "ethtool", "conntrack-tools", "curl", "iptables", "iproute2"] RUN ["sh", "-c", "rm -rf /var/cache/apk/*"] ADD ./weave /home/weave/ +ADD ./docker.tgz / ENTRYPOINT ["/home/weave/weave"]