Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 770daef

Browse filesBrowse files
--orchestrator flag is now a persistent flag
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
1 parent 1c1300b commit 770daef
Copy full SHA for 770daef

2 files changed

+5-2Lines changed: 5 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎cli/flags/common.go‎

Copy file name to clipboardExpand all lines: cli/flags/common.go
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ func (commonOpts *CommonOptions) InstallFlags(flags *pflag.FlagSet) {
5555
flags.StringVarP(&commonOpts.LogLevel, "log-level", "l", "info", `Set the logging level ("debug"|"info"|"warn"|"error"|"fatal")`)
5656
flags.BoolVar(&commonOpts.TLS, "tls", dockerTLS, "Use TLS; implied by --tlsverify")
5757
flags.BoolVar(&commonOpts.TLSVerify, FlagTLSVerify, dockerTLSVerify, "Use TLS and verify the remote")
58-
flags.StringVar(&commonOpts.Orchestrator, "orchestrator", "", "Orchestrator to use (swarm|kubernetes|all) (experimental)")
59-
flags.SetAnnotation("orchestrator", "experimentalCLI", nil)
6058

6159
// TODO use flag flags.String("identity"}, "i", "", "Path to libtrust key file")
6260

Collapse file

‎cmd/docker/docker.go‎

Copy file name to clipboardExpand all lines: cmd/docker/docker.go
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ func newDockerCommand(dockerCli *command.DockerCli) *cobra.Command {
5151
flags.StringVar(&opts.ConfigDir, "config", cliconfig.Dir(), "Location of client config files")
5252
opts.Common.InstallFlags(flags)
5353

54+
// Install persistent flags
55+
persistentFlags := cmd.PersistentFlags()
56+
persistentFlags.StringVar(&opts.Common.Orchestrator, "orchestrator", "", "Orchestrator to use (swarm|kubernetes|all) (experimental)")
57+
persistentFlags.SetAnnotation("orchestrator", "experimentalCLI", nil)
58+
5459
setFlagErrorFunc(dockerCli, cmd, flags, opts)
5560

5661
setHelpFunc(dockerCli, cmd, flags, opts)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.