diff options
author | Josh Patterson <josh.patterson@securityonionsolutions.com> | 2022-08-17 11:26:17 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-09-06 14:55:16 -0400 |
commit | 54a9e24488a455e8b338d49719bc1c514697445e (patch) | |
tree | a4962aaf00c51b1e733a4252ba74a802236ecab5 | |
parent | ecfbc6f3247448df8c297dca8c32ce7aea18656a (diff) | |
download | podman-54a9e24488a455e8b338d49719bc1c514697445e.tar.gz podman-54a9e24488a455e8b338d49719bc1c514697445e.tar.bz2 podman-54a9e24488a455e8b338d49719bc1c514697445e.zip |
api: return imageID instead of imageName, for "Image" when Podman API is queried
Signed-off-by: Josh Patterson <josh.patterson@securityonionsolutions.com>
-rw-r--r-- | pkg/api/handlers/compat/containers.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go index 0b82c48f6..61d6fc86d 100644 --- a/pkg/api/handlers/compat/containers.go +++ b/pkg/api/handlers/compat/containers.go @@ -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 @@ -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, |