code: func NewExportCommand(dockerCli command.Cli) *cobra.Command {
  	var opts exportOptions
  
  	cmd := &cobra.Command{
  		Use:   "export [OPTIONS] CONTAINER",
  		Short: "Export a container's filesystem as a tar archive",
  		Args:  cli.ExactArgs(1),
  		RunE: func(cmd *cobra.Command, args []string) error {
  			opts.container = args[0]
  			return runExport(dockerCli, opts)
  		},
  	}
  
  	flags := cmd.Flags()
  
  	flags.StringVarP(&opts.output, "output", "o", "", "Write to a file, instead of STDOUT")
  
  	return cmd
  }
docs: // NewExportCommand creates a new `docker export` command