From 6fa7bfbfb57dfd29dfaac333f9e172ac6d23aaf1 Mon Sep 17 00:00:00 2001 From: Dominique Roux Date: Tue, 27 Dec 2016 13:20:57 +0100 Subject: [PATCH] Better bugfix: - Download the docker-compose binary first to /tmp then move it to its target location --- cdist/conf/type/__docker_compose/gencode-remote | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdist/conf/type/__docker_compose/gencode-remote b/cdist/conf/type/__docker_compose/gencode-remote index 3f2fb940..3424ed6d 100644 --- a/cdist/conf/type/__docker_compose/gencode-remote +++ b/cdist/conf/type/__docker_compose/gencode-remote @@ -22,6 +22,7 @@ version="$(cat "$__object/parameter/version")" # Download docker-compose file - echo 'if [ ! -e /usr/local/bin/docker-compose ]; then curl -L "https://github.com/docker/compose/releases/download/'${version}'/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose ; fi' + echo 'curl -L "https://github.com/docker/compose/releases/download/'${version}'/docker-compose-$(uname -s)-$(uname -m)" -o /tmp/docker-compose' + echo 'mv /tmp/docker-compose /usr/local/bin/docker-compose' # Change permissions echo 'chmod +x /usr/local/bin/docker-compose'