diff options
author | Josh Patterson <josh.patterson@securityonionsolutions.com> | 2022-08-17 11:26:17 -0400 |
---|---|---|
committer | Josh Patterson <josh.patterson@securityonionsolutions.com> | 2022-08-17 11:26:17 -0400 |
commit | 6411f57e789ecef322c120d34ad634495e54d257 (patch) | |
tree | 2fd1d8d8bfa3dfd08dff62bd74e0dbe072a64adb /pkg/api | |
parent | 3aa92010dfd56fcc674fb998ad2d8551acf0cba9 (diff) | |
download | podman-6411f57e789ecef322c120d34ad634495e54d257.tar.gz podman-6411f57e789ecef322c120d34ad634495e54d257.tar.bz2 podman-6411f57e789ecef322c120d34ad634495e54d257.zip |
api: return imageID instead of imageName, for "Image" when Podman API is queried
Signed-off-by: Josh Patterson <josh.patterson@securityonionsolutions.com>
Diffstat (limited to 'pkg/api')
-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 ae063dc9f..35681cb36 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 @@ -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, |