// Module included in the following assemblies:
//
// * operators/olm-managing-custom-catalogs.adoc

[id="olm-creating-index-image_{context}"]
= Creating an index image

You can create an index image using the `opm` CLI.

.Prerequisites

* `opm` version 1.12.3+
* `podman` version 1.4.4+
* A bundle image built and pushed to a registry.

.Procedure

. Start a new index:
+
----
$ opm index add \
    --bundles quay.io/<namespace>/test-operator:v0.1.0 \//<1>
    --tag quay.io/<namespace>/test-catalog:latest <2>
----
<1> The bundle image to add to the index.
<2> The image tag that you want the index image to have.

. Push the index image to a registry:
+
----
$ podman push quay.io/<namespace>/test-catalog:latest
----

// Module included in the following assemblies:
//
// * operators/olm-managing-custom-catalogs.adoc

[id="olm-creating-index-image_{context}"]
= Creating an index image

You can create an index image using the `opm` CLI.

.Prerequisites

* `opm` version 1.12.3+
* `podman` version 1.4.4+
* A bundle image built and pushed to a registry.

.Procedure

. Start a new index:
+
----
$ opm index add \
    --bundles quay.io/<namespace>/test-operator:v0.1.0 \//<1>
    --tag quay.io/<namespace>/test-catalog:latest \//<2>
    [--binary-image <registry_base_image>] <3>
----
<1> Comma-separated list of bundle images to add to the index.
<2> The image tag that you want the index image to have.
<3> Optional: An alternative registry base image to use for serving the catalog.

. Push the index image to a registry:
+
----
$ podman push quay.io/<namespace>/test-catalog:latest
----

Add --binary-image to opm docs
Add --binary-image to opm docs
