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}
|
PASSWORD=${REGISTRY_PASSWORD}
|
||||||
|
|
||||||
function mirror() {
|
function mirror() {
|
||||||
image=$1
|
local image=$1
|
||||||
|
local os_and_arch=$2
|
||||||
image_name=$(echo "${image}" | cut -d":" -f 1)
|
image_name=$(echo "${image}" | cut -d":" -f 1)
|
||||||
image_version=$(echo "${image}" | cut -d":" -f 2)
|
image_version=$(echo "${image}" | cut -d":" -f 2)
|
||||||
|
|
||||||
echo -n "Mirroring ${image}... "
|
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"
|
echo "PULL FAILED"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -67,5 +68,6 @@ docker login -u "${USER}" -p "${PASSWORD}" "${DESTINATION_REGISTRY}"
|
|||||||
|
|
||||||
# Mirror images.
|
# Mirror images.
|
||||||
for image in "${WHAT_TO_MIRROR[@]}"; do
|
for image in "${WHAT_TO_MIRROR[@]}"; do
|
||||||
mirror "${image}"
|
mirror "${image}" linux/amd64
|
||||||
|
mirror "${image}" linux/arm64
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user