summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/container.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-02-08 16:43:32 -0600
committerbaude <bbaude@redhat.com>2019-02-08 16:43:32 -0600
commit4b40640c81bb488c5bf48478159b34475545528f (patch)
tree35f4f4263971047b2271b3bab35bfeb89a9e96f0 /cmd/podman/shared/container.go
parentafd4d5f4a4b05f421e6f336b4d74a0d808be57ed (diff)
downloadpodman-4b40640c81bb488c5bf48478159b34475545528f.tar.gz
podman-4b40640c81bb488c5bf48478159b34475545528f.tar.bz2
podman-4b40640c81bb488c5bf48478159b34475545528f.zip
Add volume mounts to PS output
When listing containers, you should be able to list the mounts with something like --format "table{{".Mounts}}". Resolves: #2238 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/shared/container.go')
-rw-r--r--cmd/podman/shared/container.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go
index f84fb8261..c74d8fdce 100644
--- a/cmd/podman/shared/container.go
+++ b/cmd/podman/shared/container.go
@@ -88,6 +88,7 @@ type PsContainerOutput struct {
PIDNS string
User string
UTS string
+ Mounts string
}
// Namespace describes output for ps namespace
@@ -228,6 +229,7 @@ func NewBatchContainer(ctr *libpod.Container, opts PsOptions) (PsContainerOutput
pso.CreatedAt = ctr.CreatedTime()
pso.StartedAt = startedAt
pso.Labels = ctr.Labels()
+ pso.Mounts = strings.Join(ctr.UserVolumes(), " ")
if opts.Namespace {
pso.Cgroup = ns.Cgroup