summaryrefslogtreecommitdiff
path: root/pkg/spec/spec.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-06-11 15:27:42 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-09 19:30:03 +0000
commit4855998f1cf533b27e48b2ded5541841fe6a3ea6 (patch)
tree7bb7e276e04f7d235e667bf088e5c87e43a74924 /pkg/spec/spec.go
parentc7424b69911222c2dc92a41308685f1e6d36fb53 (diff)
downloadpodman-4855998f1cf533b27e48b2ded5541841fe6a3ea6.tar.gz
podman-4855998f1cf533b27e48b2ded5541841fe6a3ea6.tar.bz2
podman-4855998f1cf533b27e48b2ded5541841fe6a3ea6.zip
Add --volumes-from flag to podman run and create
podman now supports --volumes-from flag, which allows users to add all the volumes an existing container has to a new one. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #931 Approved by: mheon
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r--pkg/spec/spec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index dc23c129c..ffa242675 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -248,6 +248,9 @@ func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
}
// BIND MOUNTS
+ if err := config.GetVolumesFrom(); err != nil {
+ return nil, errors.Wrap(err, "error getting volume mounts from --volumes-from flag")
+ }
mounts, err := config.GetVolumeMounts(configSpec.Mounts)
if err != nil {
return nil, errors.Wrapf(err, "error getting volume mounts")