code: func (e *Engine) BuildContent(ctx context.Context, scm coresource.Source, opts *enginetypes.BuildOptions) (io.ReadCloser, error) {
  	if opts.Builds == nil {
  		return nil, coretypes.ErrNoBuildsInSpec
  	}
  	// make build dir
  	buildDir, err := ioutil.TempDir(os.TempDir(), "corebuild-")
  	if err != nil {
  		return nil, err
  	}
  	log.Debugf("[BuildContent] Build dir %s", buildDir)
  	// create dockerfile
  	if err := e.makeDockerFile(opts, scm, buildDir); err != nil {
  		return nil, err
  	}
  	// create stream for Build API
  	return CreateTarStream(buildDir)
  }
docs: // BuildContent generate build content
  // since we wanna set UID for the user inside container, we have to know the uid parameter
  //
  // build directory is like:
  //
  //    buildDir ├─ :appname ├─ code
  //             ├─ Dockerfile