From 8e8b185acf8b291b9e05b9beec68cb2455181459 Mon Sep 17 00:00:00 2001 From: winkidney Date: Sun, 8 Dec 2019 16:33:26 +0800 Subject: [PATCH] Feature: Exit after being failed to build docker image --- Dockerfile.autobuild | 2 +- docker/bootstrap.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.autobuild b/Dockerfile.autobuild index f7003c9..3aeed5d 100644 --- a/Dockerfile.autobuild +++ b/Dockerfile.autobuild @@ -42,7 +42,7 @@ RUN cd /srv/www/pinry \ COPY . /srv/www/pinry/ # config nodejs and build frontend -RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n +RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n || exit RUN bash n 10 RUN npm -g install yarn diff --git a/docker/bootstrap.sh b/docker/bootstrap.sh index c5ce0fa..caf3fc7 100755 --- a/docker/bootstrap.sh +++ b/docker/bootstrap.sh @@ -7,7 +7,7 @@ if [ "${ALLOW_NEW_REGISTRATIONS}" = "" ]; then fi if [[ "$(docker images -q pinry/pinry 2> /dev/null)" == "" ]]; then - echo "No docker image found, building..." && "${script_dir}/build_docker.sh" + echo "No docker image found, building..." && "${script_dir}/build_docker.sh" || echo "Failed to build docker image..." && exit fi echo "=================================================================================="