diff --git a/Dockerfile b/Dockerfile index 4a26404..4332d7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -115,7 +115,7 @@ RUN PACKAGE_FILE=$(ls -1t $DEPLOYMENT_DIR/$APP_NAME_MASK 2>/dev/null | head -n 1 [ -z "$PACKAGE_FILE" ] && echo "Error. Docker image build failed: No valid application package detected." && exit 1 || \ echo "Using package file: $PACKAGE_FILE" && \ tar -xvf $PACKAGE_FILE -C $DEPLOYMENT_DIR/ && \ - perl $APP_ROOT_DIR*/automated_install.pl && \ + perl $APP_ROOT_DIR*/automated_install.pl || exit 1 && \ rm -rf $APP_ROOT_DIR* $DEPLOYMENT_DIR/$APP_NAME_MASK && \ [ -d "${APP_SERVER_DIR}/Logs" ] && \ tar czvf ${APP_SERVER_DIR}/Logs/img_build_logs.tar.gz -C ${APP_SERVER_DIR} Logs --remove-files 2> /dev/null || \ diff --git a/Dockerfile.centos b/Dockerfile.centos index 789044a..8f00e0b 100755 --- a/Dockerfile.centos +++ b/Dockerfile.centos @@ -122,7 +122,7 @@ RUN PACKAGE_FILE=$(ls -1t $DEPLOYMENT_DIR/$APP_NAME_MASK 2>/dev/null | head -n 1 [ -z "$PACKAGE_FILE" ] && echo "Error. Docker image build failed: No valid application package detected." && exit 1 || \ echo "Using package file: $PACKAGE_FILE" && \ tar -xvf $PACKAGE_FILE -C $DEPLOYMENT_DIR/ && \ - perl $APP_ROOT_DIR*/automated_install.pl && \ + perl $APP_ROOT_DIR*/automated_install.pl || exit 1 && \ rm -rf $APP_ROOT_DIR* $DEPLOYMENT_DIR/$APP_NAME_MASK && \ [ -d "${APP_SERVER_DIR}/Logs" ] && \ tar czvf ${APP_SERVER_DIR}/Logs/img_build_logs.tar.gz -C ${APP_SERVER_DIR} Logs --remove-files 2> /dev/null || \ diff --git a/Dockerfile.redhat b/Dockerfile.redhat index 07e019c..43f04e5 100644 --- a/Dockerfile.redhat +++ b/Dockerfile.redhat @@ -120,7 +120,7 @@ RUN PACKAGE_FILE=$(ls -1t $DEPLOYMENT_DIR/$APP_NAME_MASK 2>/dev/null | head -n 1 [ -z "$PACKAGE_FILE" ] && echo "Error. Docker image build failed: No valid application package detected." && exit 1 || \ echo "Using package file: $PACKAGE_FILE" && \ tar -xvf $PACKAGE_FILE -C $DEPLOYMENT_DIR/ && \ - perl $APP_ROOT_DIR*/automated_install.pl && \ + perl $APP_ROOT_DIR*/automated_install.pl || exit 1 && \ rm -rf $APP_ROOT_DIR* $DEPLOYMENT_DIR/$APP_NAME_MASK && \ [ -d "${APP_SERVER_DIR}/Logs" ] && \ tar czvf ${APP_SERVER_DIR}/Logs/img_build_logs.tar.gz -C ${APP_SERVER_DIR} Logs --remove-files 2> /dev/null || \