aboutsummaryrefslogtreecommitdiff
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-09-14 08:32:07 -0400
commit84005330aa3d25cf6134fffc1bf20354d4a3dd85 (patch)
treeaef148fafb73e36c3fed0fd7c0f2696f98a71c79 /cmd/podman/common
parentad26684856551251100b945305f91246888ef153 (diff)
downloadpodman-84005330aa3d25cf6134fffc1bf20354d4a3dd85.tar.gz
podman-84005330aa3d25cf6134fffc1bf20354d4a3dd85.tar.bz2
podman-84005330aa3d25cf6134fffc1bf20354d4a3dd85.zip
Pod Volumes Support
added support for the --volume flag in pods using the new infra container design. users can specify all volume options they can with regular containers resolves #10379 Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index 325c1dc69..6200592b4 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -660,18 +660,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
)
_ = cmd.RegisterFlagCompletionFunc(mountFlagName, AutocompleteMountFlag)
- volumeDesciption := "Bind mount a volume into the container"
- if registry.IsRemote() {
- volumeDesciption = "Bind mount a volume into the container. Volume src will be on the server machine, not the client"
- }
- volumeFlagName := "volume"
- createFlags.StringArrayVarP(
- &cf.Volume,
- volumeFlagName, "v", volumes(),
- volumeDesciption,
- )
- _ = cmd.RegisterFlagCompletionFunc(volumeFlagName, AutocompleteVolumeFlag)
-
volumesFromFlagName := "volumes-from"
createFlags.StringArrayVar(
&cf.VolumesFrom,
@@ -865,4 +853,16 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
"PID namespace to use",
)
_ = cmd.RegisterFlagCompletionFunc(pidFlagName, AutocompleteNamespace)
+
+ volumeDesciption := "Bind mount a volume into the container"
+ if registry.IsRemote() {
+ volumeDesciption = "Bind mount a volume into the container. Volume source will be on the server machine, not the client"
+ }
+ volumeFlagName := "volume"
+ createFlags.StringArrayVarP(
+ &cf.Volume,
+ volumeFlagName, "v", volumes(),
+ volumeDesciption,
+ )
+ _ = cmd.RegisterFlagCompletionFunc(volumeFlagName, AutocompleteVolumeFlag)
}