vol-374 correctly build docker images

Change-Id: I275ca749aa7173db83d3fb744234d21d18a4d234
diff --git a/docker/Dockerfile.onos b/docker/Dockerfile.onos
index acaa845..60d40e3 100644
--- a/docker/Dockerfile.onos
+++ b/docker/Dockerfile.onos
@@ -49,7 +49,8 @@
 
 # Install the applications
 COPY config/app-install.sh .
-RUN chmod 755 ./app-install.sh && ./app-install.sh
+RUN chmod 755 ./app-install.sh
+RUN ./app-install.sh
 
 # Create the final image coping over the installed applications from the build stage
 FROM onosproject/onos:1.8
diff --git a/docker/config/app-install.sh b/docker/config/app-install.sh
index 0523886..4bb8808 100644
--- a/docker/config/app-install.sh
+++ b/docker/config/app-install.sh
@@ -1,11 +1,13 @@
 #!/bin/bash 
 
+HERE=$(pwd)
 for app in $APPS; do
+    cd $HERE
     echo "Installing application '$app'"
     oar=$(find $BUILD_ROOT -path "*/target/*" -name "$app*".oar)
     if [ "$oar x" == " x" ]; then
         echo "Required application, $app, not found."
-	continue
+	exit 1
     fi
     rm -rf $APP_INSTALL_ROOT
     mkdir -p $APP_INSTALL_ROOT