Mirror amd64 and arm64 images.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f88c396ee9
commit
beae8447ec
@ -8,12 +8,13 @@ USER=${REGISTRY_USER}
|
||||
PASSWORD=${REGISTRY_PASSWORD}
|
||||
|
||||
function mirror() {
|
||||
image=$1
|
||||
local image=$1
|
||||
local os_and_arch=$2
|
||||
image_name=$(echo "${image}" | cut -d":" -f 1)
|
||||
image_version=$(echo "${image}" | cut -d":" -f 2)
|
||||
|
||||
echo -n "Mirroring ${image}... "
|
||||
if ! docker pull "${image}" &> /dev/null; then
|
||||
if ! docker pull --platform="${os_and_arch}" "${image}" &> /dev/null; then
|
||||
echo "PULL FAILED"
|
||||
exit 1
|
||||
fi
|
||||
@ -67,5 +68,6 @@ docker login -u "${USER}" -p "${PASSWORD}" "${DESTINATION_REGISTRY}"
|
||||
|
||||
# Mirror images.
|
||||
for image in "${WHAT_TO_MIRROR[@]}"; do
|
||||
mirror "${image}"
|
||||
mirror "${image}" linux/amd64
|
||||
mirror "${image}" linux/arm64
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user