From 4c057ad2042706264358acde2b6083b781147232 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Wed, 29 Jun 2022 15:21:43 +0500 Subject: [PATCH] Add bullseye image for golang and return proper exitcode in mirror script. --- images/golang.sh | 3 ++- mirror.sh | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/images/golang.sh b/images/golang.sh index c713f6c..22feefd 100644 --- a/images/golang.sh +++ b/images/golang.sh @@ -1,2 +1,3 @@ #!/usr/bin/env bash -echo "golang:1.18.3-alpine" +# Bullseye image for GCC. +echo "golang:1.18.3-alpine golang:1.18.3-bullseye" diff --git a/mirror.sh b/mirror.sh index d99a259..0274a39 100755 --- a/mirror.sh +++ b/mirror.sh @@ -55,7 +55,7 @@ function get_amd64_image() { if docker manifest inspect "${REMOTE_IMAGE}-amd64" &> /dev/null; then echo -e "\t* Layers for amd64 architecture for this image exist." - return + return 2 fi echo -ne "\t* Getting amd64 layers... " @@ -89,7 +89,7 @@ function get_arm64_image() { if docker manifest inspect "${REMOTE_IMAGE}-arm64" &> /dev/null; then echo -e "\t* Layers for arm64 architecture for this image exist." - return + return 2 fi echo -ne "\t* Getting arm64 layers... " @@ -98,7 +98,7 @@ function get_arm64_image() { if ! docker pull --platform=linux/arm64 "${image}" &> /dev/null; then echo "FAIL!" - return + return 1 fi echo -n "Downloaded, "