summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-09-21 06:29:18 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-21 21:33:41 +0000
commit52c1365f32398b8ba0321c159e739a5416cd9ab2 (patch)
tree8a700c6cc35d1955e973d18b3ed537c380290334 /cmd/podman/create.go
parent9e81f9daa4af9802088530a35a72814172430a36 (diff)
downloadpodman-52c1365f32398b8ba0321c159e739a5416cd9ab2.tar.gz
podman-52c1365f32398b8ba0321c159e739a5416cd9ab2.tar.bz2
podman-52c1365f32398b8ba0321c159e739a5416cd9ab2.zip
Add --mount option for `create` & `run` command
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1524 Approved by: mheon
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index ff912560b..fc0c71536 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -24,6 +24,7 @@ import (
"github.com/docker/docker/pkg/signal"
"github.com/docker/go-connections/nat"
"github.com/docker/go-units"
+ spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -459,6 +460,10 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
}
blkioWeight = uint16(u)
}
+ var mountList []spec.Mount
+ if mountList, err = parseMounts(c.StringSlice("mount")); err != nil {
+ return nil, err
+ }
if err = parseVolumes(c.StringSlice("volume")); err != nil {
return nil, err
@@ -772,6 +777,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
Tty: tty,
User: user,
UsernsMode: usernsMode,
+ Mounts: mountList,
Volumes: c.StringSlice("volume"),
WorkDir: workDir,
Rootfs: rootfs,