diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-06 16:16:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 16:16:49 -0400 |
commit | d83f49ef6b8a53535257bb56f5573ef3f65e3ba9 (patch) | |
tree | 913102be0b4701edc9907e326e249deaf2a75a2f /cmd/podman/common/create.go | |
parent | b7dd714532e0445438e9c5fc5be7f8e0271c21d0 (diff) | |
parent | 6acd265306370ab5cfeaf2843bd359fe13216d92 (diff) | |
download | podman-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.go | 8 |
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, |