diff --git a/scripts/installer/installer b/scripts/installer/installer index 4d5d7f99..2eb00256 100755 --- a/scripts/installer/installer +++ b/scripts/installer/installer @@ -12,6 +12,35 @@ for arg in "$@"; do fi done +function check_docker { + dockerpath=$(which dockker) + if [ -z $dockerpath ]; then + echo "Docker was not found in your \$PATH. Attempt automatic installation? [y/N]" + read answer + if [[ $answer == "y" ]]; then + wget -O- https://get.docker.com | bash + else + echo "Please install docker manually or add it to your \$PATH and re-run the installation script" + exit 1 + fi + fi + docker info > /dev/null + if [[ $? != 0 ]]; then + echo "docker info returned a non-zero value. This could be caused by your user not being in the docker group. Add user to docker group? [y/N]" + read answer + if [[ $answer == "y" ]]; then + sudo usermod -aG docker $USER + if [[ $? != 0 ]]; then + echo "Adding user failed. Add your user to docker group and re-run the installer" + exit 1 + fi + else + echo "Add your user to docker group and re-run the installer" + exit 1 + fi + fi +} + function show_banner { echo "" echo " ____ ____ _ _ " @@ -101,6 +130,7 @@ function install_abra_release { function run_installation { + check_docker show_banner install_abra_release }