code: func NewImportCommand(dockerCli command.Cli) *cobra.Command {
  	var options importOptions
  
  	cmd := &cobra.Command{
  		Use:   "import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]",
  		Short: "Import the contents from a tarball to create a filesystem image",
  		Args:  cli.RequiresMinArgs(1),
  		RunE: func(cmd *cobra.Command, args []string) error {
  			options.source = args[0]
  			if len(args) > 1 {
  				options.reference = args[1]
  			}
  			return runImport(dockerCli, options)
  		},
  	}
  
  	flags := cmd.Flags()
  
  	options.changes = dockeropts.NewListOpts(nil)
  	flags.VarP(&options.changes, "change", "c", "Apply Dockerfile instruction to the created image")
  	flags.StringVarP(&options.message, "message", "m", "", "Set commit message for imported image")
  	command.AddPlatformFlag(flags, &options.platform)
  
  	return cmd
  }
docs: // NewImportCommand creates a new `docker import` command