-mkdir -p workbench/generated
-tar -c -z -f workbench/generated/workbench.tar.gz -C ../apps workbench
-docker build -t arvados/workbench workbench
+if ! docker images > /dev/null 2>&1
+then
+ echo >&2 "WARNING: docker could not be run."
+ echo >&2 "Please make sure that:"
+ echo >&2 " * You have permission to read and write /var/run/docker.sock"
+ echo >&2 " * a 'cgroup' volume is mounted on your machine"
+ echo >&2 " * the docker daemon is running"
+ build_ok=false
+fi
+
+# * config.yml exists
+if [ '!' -f config.yml ]
+then
+ echo >&2 "WARNING: no config.yml found in the current directory"
+ echo >&2 "Copy config.yml.example to config.yml and update it with settings for your site."
+ build_ok=false
+fi
+
+# If ok to build, then go ahead and run make
+if $build_ok
+then
+ make $*
+fi