summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-04 19:52:05 +0100
committerGitHub <noreply@github.com>2022-01-04 19:52:05 +0100
commitec9d67b7e4dc1ee7f289dcb768e9285dd40e0e43 (patch)
treee14ef067bdf29a1f94b548a8305e45942af53b1b /pkg
parent9a35494141f2a3614e6e2a4c3bc2d5c6d5db9e92 (diff)
parent0c6ae3ab2681c06dbaba0bb5c002d7f2b339db61 (diff)
downloadpodman-ec9d67b7e4dc1ee7f289dcb768e9285dd40e0e43.tar.gz
podman-ec9d67b7e4dc1ee7f289dcb768e9285dd40e0e43.tar.bz2
podman-ec9d67b7e4dc1ee7f289dcb768e9285dd40e0e43.zip
Merge pull request #12735 from rhatdan/mount
Fix Container List API call to return mount info
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index 5a06722ec..ad341c3ab 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -356,6 +356,15 @@ func LibpodToContainer(l *libpod.Container, sz bool) (*handlers.Container, error
return nil, err
}
+ m, err := json.Marshal(inspect.Mounts)
+ if err != nil {
+ return nil, err
+ }
+ mounts := []types.MountPoint{}
+ if err := json.Unmarshal(m, &mounts); err != nil {
+ return nil, err
+ }
+
return &handlers.Container{Container: types.Container{
ID: l.ID(),
Names: []string{fmt.Sprintf("/%s", l.Name())},
@@ -374,7 +383,7 @@ func LibpodToContainer(l *libpod.Container, sz bool) (*handlers.Container, error
}{
"host"},
NetworkSettings: &networkSettings,
- Mounts: nil,
+ Mounts: mounts,
},
ContainerCreateConfig: types.ContainerCreateConfig{},
}, nil