summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2021-09-01 10:59:23 -0400
committercdoern <cdoern@redhat.com>2021-10-01 14:09:11 -0400
commit6da97c86314d8c80b912ba83db57fd26da19bfb7 (patch)
tree0e8e3de1d5eb89465b965458fb3068f59c702f34 /cmd/podman/common
parente9d8524af5122314e47385299bf9ae3d0b000096 (diff)
downloadpodman-6da97c86314d8c80b912ba83db57fd26da19bfb7.tar.gz
podman-6da97c86314d8c80b912ba83db57fd26da19bfb7.tar.bz2
podman-6da97c86314d8c80b912ba83db57fd26da19bfb7.zip
Pod Volumes From Support
added support for a volumes from container. this flag just required movement of the volumes-from flag declaration out of the !IsInfra block, and minor modificaions to container_create.go Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index e714b6785..a3ff37c19 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -656,14 +656,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
)
_ = cmd.RegisterFlagCompletionFunc(mountFlagName, AutocompleteMountFlag)
- volumesFromFlagName := "volumes-from"
- createFlags.StringArrayVar(
- &cf.VolumesFrom,
- volumesFromFlagName, []string{},
- "Mount volumes from the specified container(s)",
- )
- _ = cmd.RegisterFlagCompletionFunc(volumesFromFlagName, AutocompleteContainers)
-
workdirFlagName := "workdir"
createFlags.StringVarP(
&cf.Workdir,
@@ -877,4 +869,11 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
"Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)",
)
_ = cmd.RegisterFlagCompletionFunc(deviceReadBpsFlagName, completion.AutocompleteDefault)
+ volumesFromFlagName := "volumes-from"
+ createFlags.StringArrayVar(
+ &cf.VolumesFrom,
+ volumesFromFlagName, []string{},
+ "Mount volumes from the specified container(s)",
+ )
+ _ = cmd.RegisterFlagCompletionFunc(volumesFromFlagName, AutocompleteContainers)
}