|
@ -24,6 +24,7 @@ fi |
|
|
if ! command -v node &> /dev/null |
|
|
if ! command -v node &> /dev/null |
|
|
then |
|
|
then |
|
|
toolsok='no' |
|
|
toolsok='no' |
|
|
|
|
|
echo "" |
|
|
echo "No node found" |
|
|
echo "No node found" |
|
|
echo "" |
|
|
echo "" |
|
|
echo "Install: https://github.com/nodesource/distributions" |
|
|
echo "Install: https://github.com/nodesource/distributions" |
|
@ -38,6 +39,7 @@ else |
|
|
nodeversion=$(node -v | cut -d'.' -f1) |
|
|
nodeversion=$(node -v | cut -d'.' -f1) |
|
|
nodeversion="${nodeversion#v}" |
|
|
nodeversion="${nodeversion#v}" |
|
|
if [ $nodeversion -lt 15 ];then |
|
|
if [ $nodeversion -lt 15 ];then |
|
|
|
|
|
echo "" |
|
|
echo "node version < 15" |
|
|
echo "node version < 15" |
|
|
echo "" |
|
|
echo "" |
|
|
echo "Update: https://github.com/nodesource/distributions" |
|
|
echo "Update: https://github.com/nodesource/distributions" |
|
@ -55,17 +57,38 @@ fi |
|
|
#check for docker |
|
|
#check for docker |
|
|
if ! command -v docker &> /dev/null |
|
|
if ! command -v docker &> /dev/null |
|
|
then |
|
|
then |
|
|
|
|
|
echo "" |
|
|
echo "Cannot find docker" |
|
|
echo "Cannot find docker" |
|
|
|
|
|
echo "" |
|
|
echo "Install it and try again!" |
|
|
echo "Install it and try again!" |
|
|
echo "http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/docker/install.adoc.html" |
|
|
echo "http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/docker/install.adoc.html" |
|
|
|
|
|
echo "" |
|
|
|
|
|
echo "-----------USING UBUNTU------------" |
|
|
|
|
|
echo "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -" |
|
|
|
|
|
echo "sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"" |
|
|
|
|
|
echo "sudo apt update" |
|
|
|
|
|
echo "sudo apt install -y docker-ce" |
|
|
|
|
|
echo "sudo usermod -aG docker [USERNAME]" |
|
|
|
|
|
echo "" |
|
|
toolsok='no' |
|
|
toolsok='no' |
|
|
|
|
|
exit |
|
|
else |
|
|
else |
|
|
dockerversion=$(docker info --format "{{json .}}" | jq .ServerVersion | cut -d'.' -f1) |
|
|
dockerversion=$(docker info --format "{{json .}}" | jq .ServerVersion | cut -d'.' -f1) |
|
|
dockerversion="${dockerversion#\"}" |
|
|
dockerversion="${dockerversion#\"}" |
|
|
if [ $dockerversion -lt 19 ];then |
|
|
if [ $dockerversion -lt 19 ];then |
|
|
|
|
|
echo "" |
|
|
echo "docker version < 19" |
|
|
echo "docker version < 19" |
|
|
|
|
|
echo "" |
|
|
echo "Update docker and try again!" |
|
|
echo "Update docker and try again!" |
|
|
echo "http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/docker/install.adoc.html" |
|
|
echo "http://docs.swarmlab.io/SwarmLab-HowTos/labs/Howtos/docker/install.adoc.html" |
|
|
|
|
|
echo "" |
|
|
|
|
|
echo "-----------USING UBUNTU------------" |
|
|
|
|
|
echo "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -" |
|
|
|
|
|
echo "sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"" |
|
|
|
|
|
echo "sudo apt update" |
|
|
|
|
|
echo "sudo apt install -y docker-ce" |
|
|
|
|
|
echo "sudo usermod -aG docker [USERNAME]" |
|
|
|
|
|
echo "" |
|
|
toolsok='no' |
|
|
toolsok='no' |
|
|
exit |
|
|
exit |
|
|
fi |
|
|
fi |
|
|