Skip to content

Commit

Permalink
api: return imageID instead of imageName, for "Image" when Podman API…
Browse files Browse the repository at this point in the history
… is queried

Signed-off-by: Josh Patterson <[email protected]>
  • Loading branch information
m0duspwnens authored and mheon committed Sep 6, 2022
1 parent ecfbc6f commit 54a9e24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/api/handlers/compat/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ func convertSecondaryIPPrefixLen(input *define.InspectNetworkSettings, output *t
}

func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON, error) {
_, imageName := l.Image()
imageID, imageName := l.Image()
inspect, err := l.Inspect(sz)
if err != nil {
return nil, err
Expand Down Expand Up @@ -488,7 +488,7 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON,
Path: inspect.Path,
Args: inspect.Args,
State: &state,
Image: imageName,
Image: "sha256:" + imageID,
ResolvConfPath: inspect.ResolvConfPath,
HostnamePath: inspect.HostnamePath,
HostsPath: inspect.HostsPath,
Expand Down

0 comments on commit 54a9e24

Please sign in to comment.