Unable to push the images to a mirror registry with `oc image mirror` command in disconnected mirroring

Solution Unverified - Updated -

Issue

1 . Mirror registry is setup for disconnected OCP installation. The images required for OCP installation downloaded on another system having internet connection with below command.

$ oc adm release mirror -a ${LOCAL_SECRET_JSON} --to-dir=${REMOVABLE_MEDIA_PATH}/mirror quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE}`    

2 . Copied the mirror directory ${REMOVABLE_MEDIA_PATH}/mirror containing downloaded images to mirror registry host as it is.
3 . Then ran below command to push the images to a mirror registry, but it is failing with below error:

$ oc image mirror -a ${LOCAL_SECRET_JSON} --from-dir=${REMOVABLE_MEDIA_PATH}/mirror "file://openshift/release:${OCP_RELEASE}*" ${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} 
I0823 12:08:40.842777   56977 options.go:63] Search for "4.10.26*" (^4\.10\.26.*.*$) found: []
F0823 12:08:40.842809   56977 helpers.go:118] error: you must specify at least one source image to pull and the destination to push to as SRC=DST or SRC DST [DST2 DST3 ...]

Environment

  • Red Hat Openshift Container Platform 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content