Skip to content

Instantly share code, notes, and snippets.

@pandeybk
Last active September 4, 2025 22:28
Show Gist options
  • Select an option

  • Save pandeybk/bc0b9bd2bcf670f62a013fd745d9e89b to your computer and use it in GitHub Desktop.

Select an option

Save pandeybk/bc0b9bd2bcf670f62a013fd745d9e89b to your computer and use it in GitHub Desktop.
dadas
# x86_64
oc adm release mirror \
--from=quay.io/openshift-release-dev/ocp-release:4.19.1-x86_64 \
--to=$DEST \
--to-release-image=$DEST:4.19.1-x86_64 \
--dry-run | awk -F'= *' '/=/{print "docker://" $1 " docker://" $2}' > pairs-x86.txt
# aarch64
oc adm release mirror \
--from=quay.io/openshift-release-dev/ocp-release:4.19.1-aarch64 \
--to=$DEST \
--to-release-image=$DEST:4.19.1-aarch64 \
--dry-run | awk -F'= *' '/=/{print "docker://" $1 " docker://" $2}' > pairs-arm.txt
retry_copy() {
src="$1"; dst="$2"
# Add --dest-tls-verify=false only if you truly need it
until skopeo copy --all "$src" "$dst"; do
echo "retry: $src -> $dst"
sleep 20
done
}
while read -r SRC DST; do retry_copy "$SRC" "$DST"; done < pairs-x86.txt
while read -r SRC DST; do retry_copy "$SRC" "$DST"; done < pairs-arm.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment