Feature: Exit after being failed to build docker image

This commit is contained in:
winkidney
2019-12-08 16:33:26 +08:00
committed by Isaac Bythewood
parent 0aa0f64904
commit 8e8b185acf
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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 "=================================================================================="