diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-09-20 13:43:30 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-09-20 13:47:29 +0200 |
commit | 5242030ac275e497b6b91186bb6305b5cb40c96a (patch) | |
tree | b5b0315b84add3e004b929a335a6cbceff4a49f4 /pkg | |
parent | ddb384451147c4ef9d0307be0cc8dbad6d94970c (diff) | |
download | podman-5242030ac275e497b6b91186bb6305b5cb40c96a.tar.gz podman-5242030ac275e497b6b91186bb6305b5cb40c96a.tar.bz2 podman-5242030ac275e497b6b91186bb6305b5cb40c96a.zip |
compat API: /images/json prefix image id with sha256
Docker adds the `sha256:` prefix to the image ID, so our compat endpoint
has to do this as well.
Fixes #11623
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/types.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go index b82c586ea..fedab3bb3 100644 --- a/pkg/api/handlers/types.go +++ b/pkg/api/handlers/types.go @@ -183,7 +183,8 @@ func ImageToImageSummary(l *libimage.Image) (*entities.ImageSummary, error) { } is := entities.ImageSummary{ - ID: l.ID(), + // docker adds sha256: in front of the ID + ID: "sha256:" + l.ID(), ParentId: imageData.Parent, RepoTags: imageData.RepoTags, RepoDigests: imageData.RepoDigests, |