|
|
@ -135,17 +135,33 @@ fi |
|
|
|
#check for docker-compose |
|
|
|
if ! command -v docker-compose &> /dev/null |
|
|
|
then |
|
|
|
echo "" |
|
|
|
echo "Cannot find docker-compose" |
|
|
|
echo "Install it and try again!" |
|
|
|
echo "http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/docker/install.adoc.html" |
|
|
|
echo "" |
|
|
|
echo "-----------USING UBUNTU------------" |
|
|
|
echo "" |
|
|
|
echo "sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose" |
|
|
|
echo "sudo chmod +x /usr/local/bin/docker-compose" |
|
|
|
echo "sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose" |
|
|
|
echo "" |
|
|
|
toolsok='no' |
|
|
|
exit |
|
|
|
else |
|
|
|
dockercomposeversion=$(docker-compose -f $wdir/test/run.yml config --services) |
|
|
|
if [ $dockercomposeversion != 'swarmlabclient' ];then |
|
|
|
echo "" |
|
|
|
echo "Cannot find docker-compose" |
|
|
|
echo "Install it and try again!" |
|
|
|
echo "http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/docker/install.adoc.html" |
|
|
|
echo "" |
|
|
|
echo "-----------USING UBUNTU------------" |
|
|
|
echo "" |
|
|
|
echo "sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose" |
|
|
|
echo "sudo chmod +x /usr/local/bin/docker-compose" |
|
|
|
echo "sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose" |
|
|
|
echo "" |
|
|
|
toolsok='no' |
|
|
|
exit |
|
|
|
fi |
|
|
|