Repository: GoogleContainerTools/jib
File: jib-core/src/main/java/com/google/cloud/tools/jib/api/DockerClient.java (Java)

Code before:
  /**
   * Saves an image tarball from the Docker daemon.
   *
   * @see <a
   *     href="https://docs.docker.com/engine/reference/commandline/save/">https://docs.docker.com/engine/reference/commandline/save</a>
   * @param imageReference the image to save
   * @param outputPath the destination path to save the output tarball
   * @param writtenByteCountListener callback to call when bytes are saved
   * @throws InterruptedException if the 'docker save' process is interrupted
   * @throws IOException if creating the tarball fails
   */
  void save(ImageReference imageReference, Path outputPath, Consumer<Long> writtenByteCountListener)
      throws InterruptedException, IOException;

  /**
   * Gets the size, image ID, and diff IDs of an image in the Docker daemon.
   *
   * @param imageReference the image to inspect
   * @return the size, image ID, and diff IDs of the image
   * @throws IOException if an I/O exception occurs or {@code docker inspect} failed
   * @throws InterruptedException if the {@code docker inspect} process was interrupted
   */
  ImageDetails inspect(ImageReference imageReference) throws IOException, InterruptedException;

  /**
   * Gets the os and architecture of the local docker installation.
   *
   * @return the os type and architecture of the image
   * @throws IOException if an I/O exception occurs or {@code docker info} failed
   * @throws InterruptedException if the {@code docker info} process was interrupted
   */
  default DockerInfoDetails info() throws IOException, InterruptedException {
    return new DockerInfoDetails();
  }
}


Review comment (suggestion):
This could be just docker info details, `os and architecture` are implementation details of `DockerInfoDetails`, and we could add more attributes later.

Code after:
  /**
   * Saves an image tarball from the Docker daemon.
   *
   * @see <a
   *     href="https://docs.docker.com/engine/reference/commandline/save/">https://docs.docker.com/engine/reference/commandline/save</a>
   * @param imageReference the image to save
   * @param outputPath the destination path to save the output tarball
   * @param writtenByteCountListener callback to call when bytes are saved
   * @throws InterruptedException if the 'docker save' process is interrupted
   * @throws IOException if creating the tarball fails
   */
  void save(ImageReference imageReference, Path outputPath, Consumer<Long> writtenByteCountListener)
      throws InterruptedException, IOException;

  /**
   * Gets the size, image ID, and diff IDs of an image in the Docker daemon.
   *
   * @param imageReference the image to inspect
   * @return the size, image ID, and diff IDs of the image
   * @throws IOException if an I/O exception occurs or {@code docker inspect} failed
   * @throws InterruptedException if the {@code docker inspect} process was interrupted
   */
  ImageDetails inspect(ImageReference imageReference) throws IOException, InterruptedException;

  /**
   * Gets docker info details of local docker installation.
   *
   * @return docker info details.
   * @throws IOException if an I/O exception occurs or {@code docker info} failed
   * @throws InterruptedException if the {@code docker info} process was interrupted
   */
  default DockerInfoDetails info() throws IOException, InterruptedException {
    return new DockerInfoDetails();
  }
}