private static String extractFromTarFileAsString(File tarFile, String filename)
      throws IOException {
    try (TarArchiveInputStream input =
        new TarArchiveInputStream(Files.newInputStream(tarFile.toPath()))) {
      TarArchiveEntry imageEntry;
      while ((imageEntry = input.getNextTarEntry()) != null) {
        if (filename.equals(imageEntry.getName())) {
          return CharStreams.toString(new InputStreamReader(input, StandardCharsets.UTF_8));
        }
      }
    }
    throw new AssertionError("file not found: " + filename);
  }
Verify that created image has explicit directory structures, default timestamps, permissions, and
file orderings.
jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/ReproducibleImageTest.java