From b689e41696ac5211ad2f7a22664ded43c5bb4aa4 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sun, 1 Jan 2023 22:47:33 +0500 Subject: [PATCH] Show errors on push failures. --- mirror.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mirror.sh b/mirror.sh index a9c80fc..c598643 100755 --- a/mirror.sh +++ b/mirror.sh @@ -121,14 +121,18 @@ function mirror() { function push_multiarch_image() { local image=$1 - if ! docker push -f "${REMOTE_IMAGE}"-amd64 &> /dev/null; then + if ! docker push -f "${REMOTE_IMAGE}"-amd64 &> /tmp/push-amd64; then echo -e "\t! amd64 image push failed!" + + echo -e "\nLogs:\n\n" && cat /tmp/push-amd64 && echo -e "\n" else echo -e "\t* amd64 image pushed" fi - if ! docker push -f ="${REMOTE_IMAGE}"-arm64 &> /dev/null; then + if ! docker push -f ="${REMOTE_IMAGE}"-arm64 &> /tmp/push-arm64; then echo -e "\t! arm64 image push failed!" + + echo -e "\nLogs:\n\n" && cat /tmp/push-arm64 && echo -e "\n" else echo -e "\t* arm64 image pushed" fi