From 186021896700316f765d175d9bdec0524ba3c671 Mon Sep 17 00:00:00 2001 From: Jay Pfaffman Date: Tue, 6 Sep 2016 21:18:28 +0000 Subject: [PATCH] install docker if it's missing --- discourse-setup | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/discourse-setup b/discourse-setup index 69c5df5..688b0c4 100755 --- a/discourse-setup +++ b/discourse-setup @@ -10,6 +10,22 @@ check_root() { fi } + +## +## Do we have docker? +## +check_and_install_docker () { + if [ -z $docker_path ]; then + read -p "Docker not installed. Enter to install from https://get.docker.com/ or Ctrl+C to exit" + curl https://get.docker.com/ | sh + fi + if [ -z $docker_path ]; then + echo Docker install failed. Quitting. + exit + fi +} + + ## ## Do we have enough memory and disk space for Discourse? ## @@ -426,6 +442,7 @@ changelog=/tmp/changelog ## Check requirements before creating a copy of a config file we won't edit ## check_root +check_and_install_docker check_disk_and_memory check_ports -- 2.25.1