Browse Source

install

master
zeus 4 years ago
parent
commit
1777533bc9
  1. 23
      install.sh

23
install.sh

@ -24,6 +24,7 @@ fi
if ! command -v node &> /dev/null
then
toolsok='no'
echo ""
echo "No node found"
echo ""
echo "Install: https://github.com/nodesource/distributions"
@ -38,6 +39,7 @@ else
nodeversion=$(node -v | cut -d'.' -f1)
nodeversion="${nodeversion#v}"
if [ $nodeversion -lt 15 ];then
echo ""
echo "node version < 15"
echo ""
echo "Update: https://github.com/nodesource/distributions"
@ -55,17 +57,38 @@ fi
#check for docker
if ! command -v docker &> /dev/null
then
echo ""
echo "Cannot find docker"
echo ""
echo "Install it and try again!"
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'
exit
else
dockerversion=$(docker info --format "{{json .}}" | jq .ServerVersion | cut -d'.' -f1)
dockerversion="${dockerversion#\"}"
if [ $dockerversion -lt 19 ];then
echo ""
echo "docker version < 19"
echo ""
echo "Update docker and try again!"
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'
exit
fi

Loading…
Cancel
Save