code: func (d *stiDocker) CommitContainer(opts CommitContainerOptions) (string, error) {
  	dockerOpts := dockertypes.ContainerCommitOptions{
  		Reference: opts.Repository,
  	}
  	if opts.Command != nil || opts.Entrypoint != nil {
  		config := dockercontainer.Config{
  			Cmd:        opts.Command,
  			Entrypoint: opts.Entrypoint,
  			Env:        opts.Env,
  			Labels:     opts.Labels,
  			User:       opts.User,
  		}
  		dockerOpts.Config = &config
  		glog.V(2).Infof("Committing container with dockerOpts: %+v, config: %+v", dockerOpts, *util.SafeForLoggingContainerConfig(&config))
  	}
  
  	resp, err := d.client.ContainerCommit(context.Background(), opts.ContainerID, dockerOpts)
  	if err == nil {
  		return resp.ID, nil
  	}
  	return "", err
  }
docs: // CommitContainer commits a container to an image with a specific tag.
  // The new image ID is returned