diff --git a/cli/command/container/create.go b/cli/command/container/create.go index d080ae5ea558..a14520fb1a30 100644 --- a/cli/command/container/create.go +++ b/cli/command/container/create.go @@ -85,6 +85,7 @@ func NewCreateCommand(dockerCli command.Cli) *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("network", completion.NetworkNames(dockerCli)) _ = cmd.RegisterFlagCompletionFunc("pull", completion.FromList(PullImageAlways, PullImageMissing, PullImageNever)) _ = cmd.RegisterFlagCompletionFunc("restart", completeRestartPolicies) + _ = cmd.RegisterFlagCompletionFunc("volumes-from", completion.ContainerNames(dockerCli, true)) return cmd } diff --git a/cli/command/container/run.go b/cli/command/container/run.go index ae36443df4ef..046ab599ae7d 100644 --- a/cli/command/container/run.go +++ b/cli/command/container/run.go @@ -76,6 +76,7 @@ func NewRunCommand(dockerCli command.Cli) *cobra.Command { _ = cmd.RegisterFlagCompletionFunc("network", completion.NetworkNames(dockerCli)) _ = cmd.RegisterFlagCompletionFunc("pull", completion.FromList(PullImageAlways, PullImageMissing, PullImageNever)) _ = cmd.RegisterFlagCompletionFunc("restart", completeRestartPolicies) + _ = cmd.RegisterFlagCompletionFunc("volumes-from", completion.ContainerNames(dockerCli, true)) return cmd }