mirror of
https://github.com/containers/podman.git
synced 2025-12-09 23:27:09 +08:00
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
This commit is contained in:
@@ -302,6 +302,10 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = parseVolumesFrom(c.StringSlice("volumes-from")); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tty := c.Bool("tty")
|
||||
|
||||
pidMode := container.PidMode(c.String("pid"))
|
||||
@@ -596,6 +600,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
|
||||
Volumes: c.StringSlice("volume"),
|
||||
WorkDir: workDir,
|
||||
Rootfs: rootfs,
|
||||
VolumesFrom: c.StringSlice("volumes-from"),
|
||||
}
|
||||
|
||||
if !config.Privileged {
|
||||
|
||||
Reference in New Issue
Block a user