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_dockerDaemonImage()
      throws InvalidImageReferenceException, FileNotFoundException {
    CommonCliOptions commonCliOptions =
        CommandLine.populateCommand(
            new CommonCliOptions(), "-t", "docker://gcr.io/test/test-image-ref");
    ContainerizerTestProxy containerizer =
        new ContainerizerTestProxy(
            Containerizers.from(commonCliOptions, consoleLogger, cacheDirectories));

    assertThat(containerizer.getDescription()).isEqualTo("Building image to Docker daemon");
    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();
  }