better error reporting

This commit is contained in:
olli 2022-11-30 16:00:14 +01:00
parent 3fdc969f39
commit e0b64e4041

View File

@ -74,17 +74,17 @@
if docker-compose --log-level WARNING --no-ansi pull --include-deps 2>&1 | grep "download complete"
then
g_echo_warn "Installiere $docker Update"
docker-compose --log-level WARNING --no-ansi down 2>&1 || g_echo_error "$docker: docker-compose pull fehlgeschlagen"
docker-compose --log-level WARNING --no-ansi up -d 2>&1 || g_echo_error "$docker: docker-compose up fehlgeschlagen"
docker-compose --log-level WARNING --no-ansi down >$g_tmp/down 2>&1 || g_echo_error "$docker: docker-compose pull fehlgeschlagen: $(cat $g_tmp/down)"
docker-compose --log-level WARNING --no-ansi up -d >$g_tmp/up 2>&1 || g_echo_error "$docker: docker-compose up fehlgeschlagen: $(cat $g_tmp/up)"
fi
if [ -f Dockerfile ]
then
if docker-compose --log-level WARNING --no-ansi build --pull --no-cache --force-rm
if docker-compose --log-level WARNING --no-ansi build --pull --no-cache --force-rm >$g_tmp/build 2>&1
then
docker-compose --log-level WARNING --no-ansi down || g_echo_error "$docker: docker-compose pull fehlgeschlagen"
docker-compose --log-level WARNING --no-ansi up -d || g_echo_error "$docker: docker-compose up fehlgeschlagen"
docker-compose --log-level WARNING --no-ansi down >$g_tmp/down 2>&1 || g_echo_error "$docker: docker-compose pull fehlgeschlagen: $(cat $g_tmp/down)"
docker-compose --log-level WARNING --no-ansi up -d >$g_tmp/up 2>&1 || g_echo_error "$docker: docker-compose up fehlgeschlagen: $(cat $g_tmp/up)"
else
g_echo_error "$docker: docker-compose build fehlgeschlagen"
g_echo_error "$docker: docker-compose build fehlgeschlagen: $(cat $g_tmp/build)"
fi
fi
done