From 1ff7f5ebdc19982ca7f64ed734e2d52f1eeaffea Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sun, 1 Jan 2023 22:44:31 +0500 Subject: [PATCH] Echo log if pulling failed. --- mirror.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mirror.sh b/mirror.sh index 244bc57..dc27415 100755 --- a/mirror.sh +++ b/mirror.sh @@ -61,9 +61,11 @@ function get_image() { echo -ne "\t* Getting ${arch} layers... " # arm64 layers might be missing. So we just put "FAIL!" here and do nothing else. - if ! docker pull --platform=linux/"${arch}" "${image}" &> /dev/null; then + if ! docker pull --platform=linux/"${arch}" "${image}" &> "/tmp/pull-${arch}"; then echo "FAIL!" + echo -e "\nLogs:\n\n" && cat "/tmp/pull-${arch}" && echo -e "\n" + # We presume that amd64 layers are always present. Returning an error here if they're absent. if [ "${arch}" == "amd64" ]; then return 1