mirror of
https://github.com/containers/podman.git
synced 2026-10-24 02:39:13 -04:00
fix: /image/{name}/json returns RootFS layers
Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
1 parent
2cb12bbc5a
commit
89e7b8f22b
1 file changed
+8
-1
@@ -271,6 +271,13 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rootfs := docker.RootFS{}
|
||||
rootfs.Type = info.RootFS.Type
|
||||
rootfs.Layers = make([]string, 0, len(info.RootFS.Layers))
|
||||
for _, layer := range info.RootFS.Layers {
|
||||
rootfs.Layers = append(rootfs.Layers, string(layer))
|
||||
}
|
||||
dockerImageInspect := docker.ImageInspect{
|
||||
Architecture: l.Architecture,
|
||||
Author: l.Author,
|
||||
@@ -286,7 +293,7 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
|
||||
Parent: l.Parent,
|
||||
RepoDigests: info.RepoDigests,
|
||||
RepoTags: info.RepoTags,
|
||||
RootFS: docker.RootFS{},
|
||||
RootFS: rootfs,
|
||||
Size: info.Size,
|
||||
Variant: "",
|
||||
VirtualSize: info.VirtualSize,
|
||||
|
||||
Reference in new issue
Block a user