summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-04-30 11:09:48 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-03 12:23:12 +0000
commita0e8f887009bb336ef887df0ffbb9561a603bf35 (patch)
treee439723f44c74366ae9c8994cf81e648356f92a4 /cmd/podman
parentf6d41abfb04550f473b80d89cf8c02e5744a5b0b (diff)
downloadpodman-a0e8f887009bb336ef887df0ffbb9561a603bf35.tar.gz
podman-a0e8f887009bb336ef887df0ffbb9561a603bf35.tar.bz2
podman-a0e8f887009bb336ef887df0ffbb9561a603bf35.zip
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 <matthew.heon@gmail.com> Closes: #700 Approved by: rhatdan
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/spec.go4
1 files changed, 4 insertions, 0 deletions
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 {