mirror of https://github.com/containers/podman.git
api: return imageID instead of imageName, for "Image" when Podman API is queried
Signed-off-by: Josh Patterson <josh.patterson@securityonionsolutions.com>
This commit is contained in:
parent
3aa92010df
commit
6411f57e78
|
|
@ -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
|
||||
|
|
@ -487,7 +487,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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue