code: func commitContainer(docker dockerpkg.Docker, containerID, cmd, user, tag string, env, entrypoint []string, labels map[string]string) (string, error) {
  	opts := dockerpkg.CommitContainerOptions{
  		Command:     []string{cmd},
  		Env:         env,
  		Entrypoint:  entrypoint,
  		ContainerID: containerID,
  		Repository:  tag,
  		User:        user,
  		Labels:      labels,
  	}
  
  	imageID, err := docker.CommitContainer(opts)
  	if err != nil {
  		return "", s2ierr.NewCommitError(tag, err)
  	}
  
  	return imageID, nil
  }
docs: // shared methods