code: func newActivateCommand(dockerCli command.Cli) *cobra.Command {
  	var options activateOptions
  	options.licenseLoginFunc = licenseutils.Login
  
  	cmd := &cobra.Command{
  		Use:   "activate [OPTIONS]",
  		Short: "Activate Enterprise Edition",
  		Long: `Activate Enterprise Edition.
  
  With this command you may apply an existing Docker enterprise license, or
  interactively download one from Docker. In the interactive exchange, you can
  sign up for a new trial, or download an existing license. If you are
  currently running a Community Edition engine, the daemon will be updated to
  the Enterprise Edition Docker engine with additional capabilities and long
  term support.
  
  For more information about different Docker Enterprise license types visit
  https://www.docker.com/licenses
  
  For non-interactive scriptable deployments, download your license from
  https://hub.docker.com/ then specify the file with the '--license' flag.
  `,
  		RunE: func(cmd *cobra.Command, args []string) error {
  			return runActivate(dockerCli, options)
  		},
  	}
  
  	flags := cmd.Flags()
  
  	flags.StringVar(&options.licenseFile, "license", "", "License File")
  	flags.StringVar(&options.version, "version", "", "Specify engine version (default is to use currently running version)")
  	flags.StringVar(&options.registryPrefix, "registry-prefix", clitypes.RegistryPrefix, "Override the default location where engine images are pulled")
  	flags.StringVar(&options.image, "engine-image", "", "Specify engine image")
  	flags.StringVar(&options.format, "format", "", "Pretty-print licenses using a Go template")
  	flags.BoolVar(&options.displayOnly, "display-only", false, "only display license information and exit")
  	flags.BoolVar(&options.quiet, "quiet", false, "Only display available licenses by ID")
  	flags.StringVar(&options.sockPath, "containerd", "", "override default location of containerd endpoint")
  
  	return cmd
  }
docs: // newActivateCommand creates a new `docker engine activate` command