From 585dd9eecd8afe054f4a20df88fc0fd713405170 Mon Sep 17 00:00:00 2001 From: Martin Hoefling Date: Mon, 14 Nov 2016 10:07:31 +0100 Subject: [PATCH] Repair docker setup / upgrade (#158) Docker does not provide the prebuild docker binaries (1.11.2). Instead a tarball containing a directory 'docker' containing the docker binary with executable bit already set is provided. --- src/functions.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/functions.sh b/src/functions.sh index 040bc02..3e2a573 100755 --- a/src/functions.sh +++ b/src/functions.sh @@ -223,9 +223,13 @@ if [ ! -f ~/kube-solo/bin/docker ]; then cd ~/kube-solo/bin echo " " echo "Downloading docker $DOCKER_VERSION client for macOS" - curl -o ~/kube-solo/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-$DOCKER_VERSION - # Make it executable - chmod +x ~/kube-solo/bin/docker + curl -o ~/kube-solo/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-$DOCKER_VERSION.tgz + # tarball with directory docker containing docker executable + tar -xzf docker-$DOCKER_VERSION.tgz + mv docker dockerdir + mv dockerdir/docker . + rm docker-$DOCKER_VERSION.tgz + rmdir dockerdir else # docker client version INSTALLED_VERSION=$(~/kube-solo/bin/docker version | grep 'Version:' | awk '{print $2}' | tr -d '\r' | head -1 ) @@ -235,9 +239,13 @@ else cd ~/kube-solo/bin echo " " echo "Downloading docker $DOCKER_VERSION client for macOS" - curl -o ~/kube-solo/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-$DOCKER_VERSION - # Make it executable - chmod +x ~/kube-solo/bin/docker + curl -o ~/kube-solo/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-$DOCKER_VERSION.tgz + # tarball with directory docker containing docker executable + tar -xzf docker-$DOCKER_VERSION.tgz + mv docker dockerdir + mv dockerdir/docker . + rm docker-$DOCKER_VERSION.tgz + rmdir dockerdir else echo " " echo "macOS docker client is up to date with VM's version ..."