// Module included in the following assemblies:
//
// * microshift/microshift_install_get_ready/microshift-deploy-with-mirror-registry.adoc

:_mod-docs-content-type: PROCEDURE
[id="microshift-get-mirror-reg-container-image-list_{context}"]
= Getting the mirror registry container image list

[role="_abstract"]
To use a mirror registry, you must know which container image references are used by a specific version of {microshift-short}. These references are provided in the `release-<arch>.json` files that are part of the `microshift-release-info` RPM package.

[NOTE]
====
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-short} host, get the location of the files by running the following command:
+
[source,terminal]
----
$ rpm -ql microshift-release-info
----
+
.Example output
[source,text]
----
/usr/share/microshift/release/release-x86_64.json
----

** If the package is not installed on a {microshift-short} host, download and unpack the RPM package without installing it by running the following command:
+
[source,terminal]
----
$ rpm2cpio microshift-release-info*.noarch.rpm | cpio -idmv
----
+
.Example output
[source,text]
----
/usr/share/microshift/release/release-x86_64.json
----

. Extract the list of container images into the `microshift-container-refs.txt` file by running the following commands:
+
[source,terminal]
----
$ RELEASE_FILE=/usr/share/microshift/release/release-$(uname -m).json
----
+
[source,terminal]
----
$ jq -r '.images | .[]' ${RELEASE_FILE} > microshift-container-refs.txt
----
+
[NOTE]
====
After the `microshift-container-refs.txt` file is created with the {microshift-short} container image list, you can append the file with other user-specific image references before running the mirroring procedure.
====
