Merge branch 'master' into 2449-keep-write-blocks
[arvados.git] / docker / build.sh
index 7fe44471a4edb07839602fa78f5608731a7df240..cbcc840667c4001365d5644be6fc4e1b16817d90 100755 (executable)
@@ -1,20 +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, or else press ENTER to install ruby1.9.3 and continue. " unused
 
-# build the Docker images
-docker build -t arvados/base base
+    sudo apt-get update
+    sudo apt-get -y install ruby1.9.3
+fi
 
-mkdir -p api/generated
-tar -c -z -f api/generated/api.tar.gz -C ../services api
-docker build -t arvados/api api
-
-mkdir -p docserver/generated
-tar -c -z -f docserver/generated/doc.tar.gz -C .. doc
-docker build -t arvados/docserver docserver
-
-mkdir -p workbench/generated
-tar -c -z -f workbench/generated/workbench.tar.gz -C ../apps workbench
-docker build -t arvados/workbench workbench
+build_tools/build.rb $*