vendor: update containers/{common,storage,image,buildah}

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2023-11-09 14:02:31 +01:00
parent ee5f582fbc
commit 478afa728d
65 changed files with 445 additions and 15476 deletions

View File

@ -180,22 +180,26 @@ func (i *Image) Inspect(ctx context.Context, options *InspectOptions) (*ImageDat
}
// Docker image
case manifest.DockerV2Schema1MediaType, manifest.DockerV2Schema2MediaType:
case manifest.DockerV2Schema2MediaType:
rawConfig, err := i.rawConfigBlob(ctx)
if err != nil {
return nil, err
}
var dockerManifest manifest.Schema2V1Image
if err := json.Unmarshal(rawConfig, &dockerManifest); err != nil {
var dockerConfig manifest.Schema2V1Image
if err := json.Unmarshal(rawConfig, &dockerConfig); err != nil {
return nil, err
}
data.Comment = dockerManifest.Comment
data.Comment = dockerConfig.Comment
// NOTE: Health checks may be listed in the container config or
// the config.
data.HealthCheck = dockerManifest.ContainerConfig.Healthcheck
if data.HealthCheck == nil && dockerManifest.Config != nil {
data.HealthCheck = dockerManifest.Config.Healthcheck
data.HealthCheck = dockerConfig.ContainerConfig.Healthcheck
if data.HealthCheck == nil && dockerConfig.Config != nil {
data.HealthCheck = dockerConfig.Config.Healthcheck
}
case manifest.DockerV2Schema1MediaType, manifest.DockerV2Schema1SignedMediaType:
// There seem to be at least _some_ images with .Healthcheck set in schema1 (possibly just as an artifact
// of testing format conversion?), so this could plausibly read these values.
}
if data.Annotations == nil {