code: func (c *Cluster) BuildImage(buildOptions docker.BuildImageOptions) error {
  	nodes, err := c.Nodes()
  	if err != nil {
  		return err
  	}
  	if len(nodes) < 1 {
  		return errors.New("There is no docker node. Please list one in tsuru.conf or add one with `tsuru node-add`.")
  	}
  	nodeAddress := nodes[rand.Intn(len(nodes))].Address
  	node, err := c.getNodeByAddr(nodeAddress)
  	if err != nil {
  		return err
  	}
  	node.setPersistentClient()
  	err = node.BuildImage(buildOptions)
  	if err != nil {
  		return wrapError(node, err)
  	}
  	img, err := node.InspectImage(buildOptions.Name)
  	if err != nil {
  		return wrapError(node, err)
  	}
  	return c.storage().StoreImage(buildOptions.Name, img.ID, nodeAddress)
  }
docs: //BuildImage build an image and pushes it to registry