Skip to content

Commit eba9dba

Browse files
committed
ROX-27689: provide example for non-delegated roxctl image scan
1 parent e1b8afe commit eba9dba

File tree

1 file changed

+59
-3
lines changed

1 file changed

+59
-3
lines changed

cli/image-scanning-by-using-the-roxctl-cli.adoc

+59-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,58 @@ toc::[]
99
[role="_abstract"]
1010
You can scan images stored in image registries, including cluster local registries such as the {ocp} integrated image registry by using the `roxctl` CLI.
1111

12+
[id="scanning-images-by-using-a-remote-cluster_{context}"]
13+
== Scanning images by using the Central cluster
14+
15+
The following outlines the procedure for scanning images via the StackRox Scanner or Scanner V4 installed in the Central cluster.
16+
17+
.Procedure
18+
19+
* Run the following command to scan the specified image:
20+
+
21+
[source,terminal,subs="+quotes"]
22+
----
23+
$ roxctl image scan \
24+
--image=_<image_registry>_/_<image_name>_[_<reference>_] \// <1>
25+
[flags] <2>
26+
----
27+
+
28+
--
29+
<1> For `<image_registry>`, specify the registry where the image is located, for example, `registry.redhat.io`.
30+
For `<image_name>`, specify the name of the image you want to scan, for example, `default/image`.
31+
<reference> may be:
32+
* blank
33+
* a tag preceded by a colon, for example, `:latest`
34+
* a digest preceded by an at sign, for example, `@sha256:710ecc84318c54c9d1e08fe89d03e74cc09350909e5b12e5d07ac6941fd02b27`
35+
<2> Optional: For `[flags]`, you can specify parameters to modify the behavior of the command.
36+
+
37+
For more information about optional parameters, see xref:../cli/image-scanning-by-using-the-roxctl-cli.adoc#roxctl-image-scan-command-options_image-scanning-by-using-the-roxctl-cli[roxctl image scan command options].
38+
--
39+
+
40+
.Example output
41+
+
42+
[source,text,subs=attributes+]
43+
----
44+
{
45+
"Id": "sha256:3f439d7d71adb0a0c8e05257c091236ab00c6343bc44388d091450ff58664bf9", <1>
46+
"name": { <2>
47+
"registry": "registry.redhat.io", <3>
48+
"remote": "default/image", <4>
49+
"tag": "latest", <5>
50+
"fullName": "registry.redhat.iodefault/image:latest" <6>
51+
},
52+
[...]
53+
----
54+
+
55+
--
56+
<1> A unique identifier for the image that serves as a fingerprint for the image. It helps ensure the integrity and authenticity of the image.
57+
<2> Contains specific details about the image.
58+
<3> The location of the image registry where the image is stored.
59+
<4> The remote path to the image.
60+
<5> The version or tag associated with this image.
61+
<6> The complete name of the image, combining the registry, remote path, and tag.
62+
--
63+
1264
[id="scanning-images-by-using-a-remote-cluster_{context}"]
1365
== Scanning images by using a remote cluster
1466

@@ -26,14 +78,18 @@ For more information about how to configure delegated image scanning, see xref:.
2678
[source,terminal,subs="+quotes"]
2779
----
2880
$ roxctl image scan \
29-
--image=_<image_registry>_/_<image_name>_ \// <1>
81+
--image=_<image_registry>_/_<image_name>_[_<reference>_] \// <1>
3082
--cluster=_<cluster_detail>_ \// <2>
3183
[flags] <3>
3284
----
3385
+
3486
--
35-
<1> For `<image_registry>`, specify the registry where the image is located, for example, `image-registry.openshift-image-registry.svc:5000/`.
36-
For `<image_name>`, specify the name of the image you want to scan, for example, `default/image-stream:latest`.
87+
<1> For `<image_registry>`, specify the registry where the image is located, for example, `registry.redhat.io`.
88+
For `<image_name>`, specify the name of the image you want to scan, for example, `default/image`.
89+
<reference> may be:
90+
* blank
91+
* a tag preceded by a colon, for example, `:latest`
92+
* a digest preceded by an at sign, for example, `@sha256:710ecc84318c54c9d1e08fe89d03e74cc09350909e5b12e5d07ac6941fd02b27`
3793
<2> For `<cluster_detail>`, specify the name or ID of the remote cluster. For example, specify the name `remote`.
3894
<3> Optional: For `[flags]`, you can specify parameters to modify the behavior of the command.
3995
+

0 commit comments

Comments
 (0)