code: func RunSave(dockerCli command.Cli, opts saveOptions) error {
  	if opts.output == "" && dockerCli.Out().IsTerminal() {
  		return errors.New("cowardly refusing to save to a terminal. Use the -o flag or redirect")
  	}
  
  	if err := command.ValidateOutputPath(opts.output); err != nil {
  		return errors.Wrap(err, "failed to save image")
  	}
  
  	responseBody, err := dockerCli.Client().ImageSave(context.Background(), opts.images)
  	if err != nil {
  		return err
  	}
  	defer responseBody.Close()
  
  	if opts.output == "" {
  		_, err := io.Copy(dockerCli.Out(), responseBody)
  		return err
  	}
  
  	return command.CopyToFile(opts.output, responseBody)
  }
docs: // RunSave performs a save against the engine based on the specified options