1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/oc-mirror-command-reference-v2.adoc
2025-08-25 20:07:22 +00:00

113 lines
4.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Module included in the following assemblies:
//
// * installing/disconnected_install/installing-mirroring-disconnected-v2.adoc
:_mod-docs-content-type: REFERENCE
[id="oc-mirror-command-reference-v2_{context}"]
= Command reference for oc-mirror plugin v2
The following tables describe the `oc mirror` subcommands and flags for oc-mirror plugin v2:
.Subcommands and flags for the oc-mirror plugin v2
[cols="1,2",options="header"]
|===
|Subcommand
|Description
|`help`
|Show help about any subcommand
|`version`
|Output the oc-mirror version
|`delete`
|Deletes images in remote registry and local cache.
|===
.oc mirror flags
[cols="1,2",options="header"]
|===
|Flag
|Description
|`--authfile`
|Displays the string path of the authentication file. Default is `${XDG_RUNTIME_DIR}/containers/auth.json`.
|`-c`, `--config` `<string>`
|Specifies the path to an image set configuration file.
|`--cache-dir <string>`
|Use this flag to specify a directory where the oc-mirror plugin stores a persistent cache of image blobs and manifests for use during mirroring operations. The oc-mirror plugin uses the cache in the `disk-to-mirror` and `mirror-to-disk` workflows but does not use the cache in the `mirror-to-mirror` workflow. The plugin uses the cache to perform incremental mirroring and avoids remirroring unchanged images, which saves time and reduces network bandwidth usage. The default cache directory is `$HOME`. For more information, see "About the --cache-dir and --workspace flags".
|`--dest-tls-verify`
|Requires HTTPS and verifies certificates when accessing the container registry or daemon. The default value is `true`.
|`--dry-run`
|Prints actions without mirroring images.
|`--from <string>`
|Specifies the path to an image set archive that was generated by executing oc-mirror plugin v2 to load a target registry.
|`-h`, `--help`
|Displays help
|`--image-timeout duration`
|Timeout for mirroring an image. The default is 10m0s. Valid time units are `ns`, `us` or `µs`, `ms`, `s`, `m`, and `h`.
|`--log-level <string>`
|Displays string log levels. Supported values include info, debug, trace, error. The default value is `info`.
|`-p`, `--port`
|Determines the HTTP port used by oc-mirror plugin v2 local storage instance. The default value is `55000`.
|`--parallel-images <unit>`
|Specifies the number of images mirrored in parallel. The value must be in the range of 110. The default value is `4`.
|`--parallel-layers <unit>`
|Specifies the number of image layers mirrored in parallel. The value must be in the range of 110. The default value is `5`.
|`--max-nested-paths <int>`
|Specifies the maximum number of nested paths for destination registries that limit nested paths. The default value is `0`.
|`--secure-policy`
|The default value is `false`. If you set a non-default value, the command enables signature verification, which is the secure policy for signature verification.
|`--since`
|Includes all new content since a specified date (format: `yyyy-mm-dd`). When not provided, new content since previous mirroring is mirrored.
|`--src-tls-verify`
|Requires HTTPS and verifies certificates when accessing the container registry or daemon.
|`--strict-archive`
|The default value is `false`. If you set a value, the command generates archives that are strictly less than the `archiveSize` that was set in the `imageSetConfig` custom resource (CR). Mirroring exist in error if a file being archived exceeds `archiveSize` (GB).
|`-v`, `--version`
|Displays the version for oc-mirror plugin v2.
|`--workspace`
|You can use the `--workspace` flag to specify a directory where the oc-mirror plugin stores the working files that it creates during a mirroring operation, such as the `ImageDigestMirrorSet` and `ImageTagMirrorSet` manifests. Use this directory to apply the generated configuration to clusters and repeat mirroring operations. For more information, see "About the --cache-dir and --workspace flags".
|`--retry-delay duration`
|Delay between 2 retries. The default value is `1s`.
|`--retry-times <int>`
|The number of times to retry. The default value is `2`.
|`--rootless-storage-path <string>`
|Overrides the default container rootless storage path (usually in `etc/containers/storage.conf`).
|`--remove-signatures`
|Does not copy signatures from the source image.
|`--registries.d`
|Specifies the directory that contains registry configuration files.
|`--secure-policy=true`
|Enables signature verification for all images.
|`--policy`
|Specifies the path to the signature verification policy file.
|===