From a0e8f887009bb336ef887df0ffbb9561a603bf35 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 30 Apr 2018 11:09:48 -0400 Subject: Add config bool to indicate there are user volumes This allows us to accurately trigger OCI hooks that trigger on the presence of volume mounts. Signed-off-by: Matthew Heon Closes: #700 Approved by: rhatdan --- cmd/podman/spec.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/podman') diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go index 14fe3a38a..fbe611cc3 100644 --- a/cmd/podman/spec.go +++ b/cmd/podman/spec.go @@ -652,6 +652,10 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er } } + if len(c.Volumes) != 0 { + options = append(options, libpod.WithUserVolumes()) + } + if c.NetMode.IsContainer() { connectedCtr, err := c.Runtime.LookupContainer(c.NetMode.ConnectedContainer()) if err != nil { -- cgit v1.2.3-54-g00ecf