From bf26800833a68054ac6c827d3529c513154b3bca Mon Sep 17 00:00:00 2001 From: Philipp Daniels Date: Wed, 4 Jan 2017 12:21:56 +0100 Subject: [PATCH] Fix usage of docker_ip variable with multiple ips My setup contains a default Rancher node + agent on the same host. This leads to multiple ip in the docker_ip variable. Fix by adding double quotes around docker_ip variable --- launcher | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher b/launcher index f2658ad..61b22ab 100755 --- a/launcher +++ b/launcher @@ -518,7 +518,7 @@ run_start() { set -x $docker_path run $links $attach_on_run $restart_policy "${env[@]}" "${labels[@]}" -h "$hostname" \ - -e DOCKER_HOST_IP=$docker_ip --name $config -t $ports $volumes $mac_address $docker_args $user_args \ + -e DOCKER_HOST_IP="$docker_ip" --name $config -t $ports $volumes $mac_address $docker_args $user_args \ $run_image $boot_command ) @@ -562,7 +562,7 @@ run_bootstrap() { echo $run_command unset ERR - (exec echo "$input" | $docker_path run $user_args $links "${env[@]}" -e DOCKER_HOST_IP=$docker_ip --cidfile $cidbootstrap -i -a stdin -a stdout -a stderr $volumes $image \ + (exec echo "$input" | $docker_path run $user_args $links "${env[@]}" -e DOCKER_HOST_IP="$docker_ip" --cidfile $cidbootstrap -i -a stdin -a stdout -a stderr $volumes $image \ /bin/bash -c "$run_command") || ERR=$? unset FAILED -- 2.25.1