code: func (d *stiDocker) CheckAndPullImage(name string) (*api.Image, error) {
  	name = getImageName(name)
  	displayName := name
  
  	if !glog.Is(3) {
  		// For less verbose log levels (less than 3), shorten long iamge names like:
  		//     "centos/php-56-centos7@sha256:51c3e2b08bd9fadefccd6ec42288680d6d7f861bdbfbd2d8d24960621e4e27f5"
  		// to include just enough characters to differentiate the build from others in the docker repository:
  		//     "centos/php-56-centos7@sha256:51c3e2b08bd..."
  		// 18 characters is somewhat arbitrary, but should be enough to avoid a name collision.
  		split := strings.Split(name, "@")
  		if len(split) > 1 && len(split[1]) > 18 {
  			displayName = split[0] + "@" + split[1][:18] + "..."
  		}
  	}
  
  	image, err := d.CheckImage(name)
  	if err != nil && !strings.Contains(err.(s2ierr.Error).Details.Error(), "No such image") {
  		return nil, err
  	}
  	if image == nil {
  		glog.V(1).Infof("Image %q not available locally, pulling ...", displayName)
  		return d.PullImage(name)
  	}
  
  	glog.V(3).Infof("Using locally available image %q", displayName)
  	return image, nil
  }
docs: // CheckAndPullImage pulls an image into the local registry if not present
  // and returns the image metadata