manifest/docker_schema1.go
func (m *Schema1) Inspect(_ func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error) {
	s1 := &Schema2V1Image{}
	if err := json.Unmarshal([]byte(m.History[0].V1Compatibility), s1); err != nil {
		return nil, err
	}
	i := &types.ImageInspectInfo{
		Tag:           m.Tag,
		Created:       &s1.Created,
		DockerVersion: s1.DockerVersion,
		Architecture:  s1.Architecture,
		Os:            s1.OS,
		Layers:        layerInfosToStrings(m.LayerInfos()),
	}
	if s1.Config != nil {
		i.Labels = s1.Config.Labels
	}
	return i, nil
}
func (m *Schema1) Inspect(_ func(types.BlobInfo) ([]byte, error)) (*types.ImageInspectInfo, error) {
	s1 := &Schema2V1Image{}
	if err := json.Unmarshal([]byte(m.History[0].V1Compatibility), s1); err != nil {
		return nil, err
	}
	i := &types.ImageInspectInfo{
		Tag:           m.Tag,
		Created:       &s1.Created,
		DockerVersion: s1.DockerVersion,
		Architecture:  s1.Architecture,
		Os:            s1.OS,
		Layers:        layerInfosToStrings(m.LayerInfos()),
	}
	if s1.Config != nil {
		i.Labels = s1.Config.Labels
	}
	return i, nil
}
// Inspect returns various information for (skopeo inspect) parsed from the manifest and configuration.