第 6 章 Image scanning by using the roxctl CLI
You can scan images stored in image registries, including cluster local registries such as the OpenShift Container Platform integrated image registry by using the roxctl CLI.
6.1. Scanning images by using a remote cluster 复制链接链接已复制到粘贴板!
By specifying the appropriate cluster in the delegated scanning configuration or through the cluster parameter described in the following procedure, you can scan images from cluster local registries by using a remote cluster.
For more information about how to configure delegated image scanning, see Configuring delegated image scanning.
Procedure
Run the following command to scan the specified image in a remote cluster:
$ roxctl image scan \ --image=<image_registry>/<image_name> \ --cluster=<cluster_detail> \ [flags]where:
<image_registry>-
Specifies the registry where the image is located, for example,
image-registry.openshift-image-registry.svc:5000/. image_name- Specifies the name of the image that you want to scan.
<cluster_detail>-
Specifies the name or ID of the remote cluster. For example, specify the name
remote. [flags]- Specifies the parameters to modify the behavior of the command. This is optional.
Example output
{ "Id": "sha256:3f439d7d71adb0a0c8e05257c091236ab00c6343bc44388d091450ff58664bf9", "name": { "registry": "image-registry.openshift-image-registry.svc:5000", "remote": "default/image-stream", "tag": "latest", "fullName": "image-registry.openshift-image-registry.svc:5000/default/image-stream:latest" }, [...]-
Idis a unique identifier for the image that serves as a fingerprint for the image. It helps ensure the integrity and authenticity of the image. -
registryis the location of the image registry where the image is stored. -
remoteis the remote path to the image. -
tagis the version or tag associated with this image. -
fullNameis the complete name of the image, combining the registry, remote path, and tag.