diff --git a/cdist/conf/type/__docker_compose/gencode-remote b/cdist/conf/type/__docker_compose/gencode-remote
index f22823d3..3424ed6d 100644
--- a/cdist/conf/type/__docker_compose/gencode-remote
+++ b/cdist/conf/type/__docker_compose/gencode-remote
@@ -22,7 +22,7 @@
 version="$(cat "$__object/parameter/version")"
 
 # Download docker-compose file
-echo 'curl -L "https://github.com/docker/compose/releases/download/'${version}'/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose'
-
+    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'