Add alpine:3.16.0 for mirrorring and add ability to check if image mirrorred.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Stanislav Nikitin 2022-06-28 22:10:56 +05:00
parent 3f26589e85
commit e0b6a10931
Signed by: pztrn
GPG Key ID: 1E944A0F0568B550
2 changed files with 16 additions and 1 deletions

2
images/alpine.sh Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
echo "alpine:3.16.0"

View File

@ -51,9 +51,15 @@ function get_amd64_image() {
image_name=$(echo "${image}" | cut -d":" -f 1)
image_version=$(echo "${image}" | cut -d":" -f 2)
# Check if amd64 layers should be fetched.
if docker manifest inspect "${REMOTE_IMAGE}-amd64" &> /dev/null; then
echo -e "\t* Layers for amd64 architecture for this image exist."
return
fi
echo -ne "\t* Getting amd64 layers... "
# arm64 layers might be missing. So we just put "FAIL!" here and do nothing else.
if ! docker pull --platform=linux/amd64 "${image}" &> /dev/null; then
echo "FAIL!"
@ -79,6 +85,13 @@ function get_arm64_image() {
image_name=$(echo "${image}" | cut -d":" -f 1)
image_version=$(echo "${image}" | cut -d":" -f 2)
# Check if arm64 layers should be fetched.
if docker manifest inspect "${REMOTE_IMAGE}-arm64" &> /dev/null; then
echo -e "\t* Layers for arm64 architecture for this image exist."
return
fi
echo -ne "\t* Getting arm64 layers... "
# arm64 layers might be missing. So we just put "FAIL!" here and do nothing else.