Fix bugs introduced from merge with master. (refs #2221)
[arvados.git] / docker / build.sh
index 5790662b570799d5bd9999dfa5d128dc8a8810cf..a6bb5b843ac55fe2a263aa82a53fd0d04cb1d798 100755 (executable)
@@ -1,9 +1,14 @@
-#! /bin/sh
+#! /bin/bash
 
-# build the base wheezy image, if it doesn't already exist
-(docker images | grep '^arvados/debian') || \
-  ./mkimage-debootstrap.sh arvados/debian wheezy http://debian.lcs.mit.edu/debian/
+# make sure Ruby 1.9.3 is installed before proceeding
+if ! ruby -e 'exit RUBY_VERSION >= "1.9.3"' 2>/dev/null
+then
+    echo "Installing Arvados requires at least Ruby 1.9.3."
+    echo "You may need to enter your password."
+    read -p "Press Ctrl-C to abort, otherwise we will install ruby1.9.3 now..." unused
+    
+    sudo apt-get update
+    sudo apt-get -y install ruby1.9.3
+fi
 
-# build the Docker images
-docker build -t arvados/base base
-docker build -t arvados/api api
+./build.rb $*