code: func (i *ImageService) CreateImage(config []byte, parent string) (builder.Image, error) {
  	id, err := i.imageStore.Create(config)
  	if err != nil {
  		return nil, errors.Wrapf(err, "failed to create image")
  	}
  
  	if parent != "" {
  		if err := i.imageStore.SetParent(id, image.ID(parent)); err != nil {
  			return nil, errors.Wrapf(err, "failed to set parent %s", parent)
  		}
  	}
  
  	return i.imageStore.Get(id)
  }
docs: // CreateImage creates a new image by adding a config and ID to the image store.
  // This is similar to LoadImage() except that it receives JSON encoded bytes of
  // an image instead of a tar archive.