code: public String commitContainer(
              String container,
              Optional<String> repo,
              Optional<String> tag,
              Optional<String> comment,
              Optional<String> author) {
  
          WebTarget request = getServiceEndPoint()
                  .path("/commit")
                  .queryParam("container", container)
                  .queryParam("repo", repo.orElse(null))
                  .queryParam("tag", tag.orElse(null))
                  .queryParam("comment", comment.orElse(null))
                  .queryParam("author", author.orElse(null));
  
          String json = request
                  .request(MediaType.APPLICATION_JSON_TYPE)
                  .method(HttpMethod.POST, String.class);
  
          ContainerCommitResponse result = toObject(json, ContainerCommitResponse.class);
  
          return result.getId();
      }
docs: Create a new image from a container's changes
  
  @param container source container
  @param repo repository
  @param tag tag
  @param comment commit message
  @param author author (e.g., "John Hannibal Smith &lt;hannibal@a-team.com&gt;")
  
  @return the ID of the created image