type ImageListOptions struct All controls whether all images in the graph are filtered or just the heads All bool Filters is a JSON-encoded set of filter arguments Filters filtersArgs SharedSize
这是一个Go语言结构体,用于配置图像列表选项的参数。
All字段指示是否过滤所有图像,还是只过滤头部图像。Filters字段是一个JSON编码的过滤参数集合。可以使用这些过滤参数来筛选特定属性的图像,例如标签、状态等。SharedSize字段指示是否计算图像的共享大小。如果设置为true,则会计算所有图像的共享大小;如果设置为false,则不会计算共享大小。ContainerCount字段指示是否计算容器的数量。如果设置为true,则会计算容器的数量;如果设置为false,则不会计算容器的数量。
要配置这些选项,您可以创建一个ImageListOptions类型的变量,并设置相应的字段值。例如:
options := ImageListOptions{
All: true,
Filters: filters.Args{"label": "production"},
SharedSize: true,
ContainerCount: false,
}
原文地址: http://www.cveoy.top/t/topic/irmy 著作权归作者所有。请勿转载和采集!