code: func (c *Cluster) CommitContainer(opts docker.CommitContainerOptions) (*docker.Image, error) {
  	node, err := c.getNodeForContainer(opts.Container)
  	if err != nil {
  		return nil, err
  	}
  	node.setPersistentClient()
  	image, err := node.CommitContainer(opts)
  	if err != nil {
  		return nil, wrapError(node, err)
  	}
  	key := imageKey(opts.Repository, opts.Tag)
  	if key != "" {
  		err = c.storage().StoreImage(key, image.ID, node.addr)
  		if err != nil {
  			return nil, err
  		}
  	}
  	return image, nil
  }
docs: // CommitContainer commits a container and returns the image id.