code: func New(client docker.Client, config *api.Config, fs fs.FileSystem, overrides build.Overrides) (*OnBuild, error) {
  	dockerHandler := docker.New(client, config.PullAuthentication)
  	builder := &OnBuild{
  		docker: dockerHandler,
  		git:    git.New(fs, cmd.NewCommandRunner()),
  		fs:     fs,
  		tar:    tar.New(fs),
  	}
  	// Use STI Prepare() and download the 'run' script optionally.
  	s, err := sti.New(client, config, fs, overrides)
  	if err != nil {
  		return nil, err
  	}
  	s.SetScripts([]string{}, []string{constants.Assemble, constants.Run})
  
  	downloader := overrides.Downloader
  	if downloader == nil {
  		downloader, err = scm.DownloaderForSource(builder.fs, config.Source, config.ForceCopy)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	builder.source = onBuildSourceHandler{
  		Downloader: downloader,
  		Preparer:   s,
  		Ignorer:    &ignore.DockerIgnorer{},
  	}
  
  	builder.garbage = build.NewDefaultCleaner(builder.fs, builder.docker)
  	return builder, nil
  }
docs: // New returns a new instance of OnBuild builder