8.2. opm CLI reference


The opm command-line interface (CLI) is a tool for creating and maintaining Operator catalogs.

opm CLI syntax

$ opm <command> [<subcommand>] [<argument>] [<flags>]

警告

The opm CLI is not forward compatible. The version of the opm CLI used to generate catalog content must be earlier than or equal to the version used to serve the content on a cluster.

Expand
表 8.1. Global flags
FlagDescription

-skip-tls-verify

Skip TLS certificate verification for container image registries while pulling bundles or indexes.

--use-http

When you pull bundles, use plain HTTP for container image registries.

重要

The SQLite-based catalog format, including the related CLI commands, is a deprecated feature. Deprecated functionality is still included in OpenShift Container Platform and continues to be supported; however, it will be removed in a future release of this product and is not recommended for new deployments.

For the most recent list of major functionality that has been deprecated or removed within OpenShift Container Platform, refer to the Deprecated and removed features section of the OpenShift Container Platform release notes.

8.2.1. generate

Generate various artifacts for declarative config indexes.

Command syntax

$ opm generate <subcommand> [<flags>]

Expand
表 8.2. generate subcommands
SubcommandDescription

dockerfile

Generate a Dockerfile for a declarative config index.

Expand
表 8.3. generate flags
FlagsDescription

-h, --help

Help for generate.

8.2.1.1. dockerfile

Generate a Dockerfile for a declarative config index.

重要

This command creates a Dockerfile in the same directory as the <dcRootDir> (named <dcDirName>.Dockerfile) that is used to build the index. If a Dockerfile with the same name already exists, this command fails.

When specifying extra labels, if duplicate keys exist, only the last value of each duplicate key gets added to the generated Dockerfile.

Command syntax

$ opm generate dockerfile <dcRootDir> [<flags>]

Expand
表 8.4. generate dockerfile flags
FlagDescription

-i, --binary-image (string)

Image in which to build catalog. The default value is quay.io/operator-framework/opm:latest.

-l, --extra-labels (string)

Extra labels to include in the generated Dockerfile. Labels have the form key=value.

-h, --help

Help for Dockerfile.

注意

To build with the official Red Hat image, use the registry.redhat.io/openshift4/ose-operator-registry-rhel9:v4.21 value with the -i flag.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部