code: func (commonOpts *CommonOptions) InstallFlags(flags *pflag.FlagSet) {
  	if dockerCertPath == "" {
  		dockerCertPath = cliconfig.Dir()
  	}
  
  	flags.BoolVarP(&commonOpts.Debug, "debug", "D", false, "Enable debug mode")
  	flags.StringVarP(&commonOpts.LogLevel, "log-level", "l", "info", `Set the logging level ("debug"|"info"|"warn"|"error"|"fatal")`)
  	flags.BoolVar(&commonOpts.TLS, "tls", dockerTLS, "Use TLS; implied by --tlsverify")
  	flags.BoolVar(&commonOpts.TLSVerify, FlagTLSVerify, dockerTLSVerify, "Use TLS and verify the remote")
  
  	// TODO use flag flags.String("identity"}, "i", "", "Path to libtrust key file")
  
  	commonOpts.TLSOptions = &tlsconfig.Options{
  		CAFile:   filepath.Join(dockerCertPath, DefaultCaFile),
  		CertFile: filepath.Join(dockerCertPath, DefaultCertFile),
  		KeyFile:  filepath.Join(dockerCertPath, DefaultKeyFile),
  	}
  	tlsOptions := commonOpts.TLSOptions
  	flags.Var(opts.NewQuotedString(&tlsOptions.CAFile), "tlscacert", "Trust certs signed only by this CA")
  	flags.Var(opts.NewQuotedString(&tlsOptions.CertFile), "tlscert", "Path to TLS certificate file")
  	flags.Var(opts.NewQuotedString(&tlsOptions.KeyFile), "tlskey", "Path to TLS key file")
  
  	// opts.ValidateHost is not used here, so as to allow connection helpers
  	hostOpt := opts.NewNamedListOptsRef("hosts", &commonOpts.Hosts, nil)
  	flags.VarP(hostOpt, "host", "H", "Daemon socket(s) to connect to")
  	flags.StringVarP(&commonOpts.Context, "context", "c", "",
  		`Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")`)
  }
docs: // InstallFlags adds flags for the common options on the FlagSet