public static Containerizer from(
      CommonCliOptions commonCliOptions, ConsoleLogger logger, CacheDirectories cacheDirectories)
      throws InvalidImageReferenceException, FileNotFoundException {
    Containerizer containerizer = create(commonCliOptions, logger);

    applyHandlers(containerizer, logger);
    applyConfiguration(containerizer, commonCliOptions, cacheDirectories);

    return containerizer;
  }
@Test
  public void testFrom_tarImage() throws InvalidImageReferenceException, IOException {
    Path tarPath = temporaryFolder.getRoot().toPath().resolve("test-tar.tar");
    CommonCliOptions commonCliOptions =
        CommandLine.populateCommand(
            new CommonCliOptions(),
            "-t=tar://" + tarPath.toAbsolutePath(),
            "--name=gcr.io/test/test-image-ref");
    ContainerizerTestProxy containerizer =
        new ContainerizerTestProxy(
            Containerizers.from(commonCliOptions, consoleLogger, cacheDirectories));

    assertThat(containerizer.getDescription()).isEqualTo("Building image tarball");
    ImageConfiguration config = containerizer.getImageConfiguration();

    assertThat(config.getCredentialRetrievers()).isEmpty();
    assertThat(config.getDockerClient()).isEmpty();
    assertThat(config.getImage().toString()).isEqualTo("gcr.io/test/test-image-ref");
    assertThat(config.getTarPath()).isEmpty(); // weird, but the way jib currently works
  }