@Test
  public void testBasic_tarBaseImage_jibImage()
      throws InvalidImageReferenceException, InterruptedException, ExecutionException,
          RegistryException, CacheDirectoryCreationException, IOException, URISyntaxException {
    Path outputPath = temporaryFolder.getRoot().toPath().resolve("jib-image.tar");
    Jib.from(dockerHost + ":5000/busybox")
        .addLayer(
            Collections.singletonList(Paths.get(Resources.getResource("core/hello").toURI())), "/")
        .containerize(
            Containerizer.to(TarImage.at(outputPath).named("ignored"))
                .setAllowInsecureRegistries(true));

    String toImage = dockerHost + ":5000/basic-jibtar";
    JibContainer jibContainer =
        Jib.from(TarImage.at(outputPath).named("ignored"))
            .setEntrypoint("cat", "/hello")
            .containerize(
                Containerizer.to(RegistryImage.named(toImage)).setAllowInsecureRegistries(true));

    Assert.assertEquals("Hello World\n", pullAndRunBuiltImage(toImage));
    Assert.assertEquals(
        "Hello World\n", pullAndRunBuiltImage(toImage + "@" + jibContainer.getDigest()));
  }
Pulls a built image and attempts to run it.

@param imageReference the image reference of the built image
@return the container output
@throws IOException if an I/O exception occurs
@throws InterruptedException if the process was interrupted
jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/JibIntegrationTest.java