Expose image variant

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-03-30 15:16:11 +02:00
parent f74c41f2ca
commit 044cdf90aa
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 4 additions and 0 deletions

View File

@ -120,6 +120,8 @@ type Schema2V1Image struct {
Config *Schema2Config `json:"config,omitempty"` Config *Schema2Config `json:"config,omitempty"`
// Architecture is the hardware that the image is build and runs on // Architecture is the hardware that the image is build and runs on
Architecture string `json:"architecture,omitempty"` Architecture string `json:"architecture,omitempty"`
// Variant is a variant of the CPU that the image is build and runs on
Variant string `json:"variant,omitempty"`
// OS is the operating system used to build and run the image // OS is the operating system used to build and run the image
OS string `json:"os,omitempty"` OS string `json:"os,omitempty"`
// Size is the total size of the image including all layers it is composed of // Size is the total size of the image including all layers it is composed of
@ -330,6 +332,7 @@ func (m *Schema2) Inspect(configGetter func(types.BlobInfo) ([]byte, error)) (*t
Created: &s2.Created, Created: &s2.Created,
DockerVersion: s2.DockerVersion, DockerVersion: s2.DockerVersion,
Architecture: s2.Architecture, Architecture: s2.Architecture,
Variant: s2.Variant,
Os: s2.OS, Os: s2.OS,
Layers: layerInfosToStrings(m.LayerInfos()), Layers: layerInfosToStrings(m.LayerInfos()),
} }

View File

@ -444,6 +444,7 @@ type ImageInspectInfo struct {
DockerVersion string DockerVersion string
Labels map[string]string Labels map[string]string
Architecture string Architecture string
Variant string
Os string Os string
Layers []string Layers []string
Env []string Env []string