Work with manifest lists
To precisely manage multi-architecture or variant images contained within a manifest list, use the --import-mode flag with oc import-image or oc tag CLI commands. This functionality allows you to import a single sub-manifest, or all manifests, of a manifest list, providing fine-grained control over your image stream content.
In some cases, users might want to use sub-manifests directly. When oc adm prune images is run, or the CronJob pruner runs, they cannot detect when a sub-manifest list is used. As a result, an administrator using oc adm prune images, or the CronJob pruner, might delete entire manifest lists, including sub-manifests.
To avoid this limitation, you can use the manifest list by tag or by digest instead.
-
Create an image stream that includes multi-architecture images, and sets the import mode to
PreserveOriginal, by entering the following command:$ oc import-image <multiarch-image-stream-tag> --from=<registry>/<project_name>/<image-name> \ --import-mode='PreserveOriginal' --reference-policy=local --confirmExample output--- Arch: <none> Manifests: linux/amd64 sha256:6e325b86566fafd3c4683a05a219c30c421fbccbf8d87ab9d20d4ec1131c3451 linux/arm64 sha256:d8fad562ffa75b96212c4a6dc81faf327d67714ed85475bf642729703a2b5bf6 linux/ppc64le sha256:7b7e25338e40d8bdeb1b28e37fef5e64f0afd412530b257f5b02b30851f416e1 --- -
Alternatively, enter the following command to import an image with the
Legacyimport mode, which discards manifest lists and imports a single sub-manifest:$ oc import-image <multiarch-image-stream-tag> --from=<registry>/<project_name>/<image-name> \ --import-mode='Legacy' --confirmThe
--import-mode=default value isLegacy. Excluding this value, or failing to specify eitherLegacyorPreserveOriginal, imports a single sub-manifest. An invalid import mode returns the following error:error: valid ImportMode values are Legacy or PreserveOriginal.