Mirror from mirror to mirror
You can use the oc-mirror plugin to mirror an image set directly to a target mirror registry that is accessible during image set creation.
-
You have access to the internet to get the required container images.
-
You installed the OpenShift CLI (
oc). -
You installed the
oc-mirrorCLI plugin. -
You created the image set configuration file.
-
Mirror the images from the specified image set configuration to a specified registry by running the following command:
$ oc-mirror --config imageset-config.yaml --workspace file://<em><v2_workspace></em> \// docker://<em><remote_registry></em> --v2-
You must use the
--workspaceflag for the mirror-to-mirror process. Replace <v2_workspace> with the directory you want to use to store custom resources for the mirroring process. -
Replace <remote_registry> with the name of the registry to mirror the image set file to. The registry must start with
docker://. If you specify a top-level namespace for the mirror registry, you must also use this same namespace on later executions.Example outputRendering catalog image "registry.example.com/redhat/redhat-operator-index:v{ocp-version}" with file-based catalogYou must use the
ImageDigestMirrorSetYAML file as reference content for manual configuration of CRI-O in MicroShift. You cannot apply the resource directly into a MicroShift node.
-
-
List the contents of the
cluster-resourcessubdirectory by running the following command:$ ls <v2_workspace>/working-dir/cluster-resources/Replace <v2_workspace> with the directory you used to store custom resources for the mirroring process.
-
Convert the
ImageDigestMirrorSetYAML content for use in manually configuring CRI-O. -
If required, mirror the images from mirror to disk for disconnected or offline use.