跳到主要内容
版本:v1.9

查看镜像 SBOM 数据

可使用 hangar view sbom 命令查看镜像的 SBOM 数据。

快速上手

使用以下命令查看镜像 SBOM 信息。

#!/bin/bash

hangar view sbom cnrancher/rancher:v1.9.0

要求容器镜像由 Docker Buildx 构建且启用了 SBOM 输出,否则执行 hangar view sbom 时将报错找不到 SBOM 数据。

Usage

hangar view sbom --help
View image SBOM data

Usage:
hangar view sbom [flags]

Flags:
-y, --auto-yes answer yes automatically (used in shell script)
-h, --help help for sbom
--override-arch string use ARCH instead of the architecture of the machine for choosing images
--override-os string use OS instead of the running OS for choosing images
--tls-verify require HTTPS and verify certificates (default true)

Global Flags:
--debug enable debug output
--insecure-policy run Hangar without policy check