summaryrefslogtreecommitdiff
path: root/cmd/podman/common/create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-06 16:16:49 -0400
committerGitHub <noreply@github.com>2021-04-06 16:16:49 -0400
commitd83f49ef6b8a53535257bb56f5573ef3f65e3ba9 (patch)
tree913102be0b4701edc9907e326e249deaf2a75a2f /cmd/podman/common/create.go
parentb7dd714532e0445438e9c5fc5be7f8e0271c21d0 (diff)
parent6acd265306370ab5cfeaf2843bd359fe13216d92 (diff)
downloadpodman-d83f49ef6b8a53535257bb56f5573ef3f65e3ba9.tar.gz
podman-d83f49ef6b8a53535257bb56f5573ef3f65e3ba9.tar.bz2
podman-d83f49ef6b8a53535257bb56f5573ef3f65e3ba9.zip
Merge pull request #9754 from mheon/add_dep
Add --requires flag to podman run/create
Diffstat (limited to 'cmd/podman/common/create.go')
-rw-r--r--cmd/podman/common/create.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index dda709ecd..220a30a10 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -576,6 +576,14 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
`If a container with the same name exists, replace it`,
)
+ requiresFlagName := "requires"
+ createFlags.StringSliceVar(
+ &cf.Requires,
+ requiresFlagName, []string{},
+ "Add one or more requirement containers that must be started before this container will start",
+ )
+ _ = cmd.RegisterFlagCompletionFunc(requiresFlagName, AutocompleteContainers)
+
restartFlagName := "restart"
createFlags.StringVar(
&cf.Restart,