@Test
  public void testBasic_tarBaseImage_dockerSavedCommand()
      throws IOException, InterruptedException, InvalidImageReferenceException, ExecutionException,
          RegistryException, CacheDirectoryCreationException {
    Path path = temporaryFolder.getRoot().toPath().resolve("docker-save.tar");
    new Command("docker", "save", dockerHost + ":5000/busybox", "-o=" + path).run();

    String toImage = dockerHost + ":5000/basic-dockersavedcommand";
    JibContainer jibContainer =
        Jib.from("tar://" + path)
            .setEntrypoint("echo", "Hello World")
            .containerize(
                Containerizer.to(RegistryImage.named(toImage)).setAllowInsecureRegistries(true));

    Assert.assertEquals("Hello World\n", pullAndRunBuiltImage(toImage));
    Assert.assertEquals(
        "Hello World\n", pullAndRunBuiltImage(toImage + "@" + jibContainer.getDigest()));
    imageToDelete = toImage;
  }
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