4.2. Getting the mirror registry container image list
To use a mirror registry, you must know which container image references are used by a specific version of MicroShift. These references are provided in the release-<arch>.json files that are part of the microshift-release-info RPM package.
To mirror the Operator Lifecycle Manager (OLM) in disconnected environments, add the references provided in the release-olm-$ARCH.json that is included in the microshift-olm RPM and follow the same procedure. Use the oc-mirror CLI plugin for mirroring Operator catalogs and Operators.
Prerequisites
- You have installed jq.
Procedure
Access the list of container image references by using one of the following methods:
If the package is installed on the MicroShift host, get the location of the files by running the following command:
$ rpm -ql microshift-release-infoExample output
/usr/share/microshift/release/release-x86_64.jsonIf the package is not installed on a MicroShift host, download and unpack the RPM package without installing it by running the following command:
$ rpm2cpio microshift-release-info*.noarch.rpm | cpio -idmvExample output
/usr/share/microshift/release/release-x86_64.json
Extract the list of container images into the
microshift-container-refs.txtfile by running the following commands:$ RELEASE_FILE=/usr/share/microshift/release/release-$(uname -m).json$ jq -r '.images | .[]' ${RELEASE_FILE} > microshift-container-refs.txt
After the microshift-container-refs.txt file is created with the MicroShift container image list, you can append the file with other user-specific image references before running the mirroring procedure.