class Containerizer {

  public static Containerizer to(RegistryImage registryImage) {
    ImageConfiguration imageConfiguration =
        ImageConfiguration.builder(registryImage.getImageReference())
            .setCredentialRetrievers(registryImage.getCredentialRetrievers())
            .build();

    Function<BuildContext, StepsRunner> stepsRunnerFactory =
        buildContext -> StepsRunner.begin(buildContext).registryPushSteps();

    return new Containerizer(
        DESCRIPTION_FOR_DOCKER_REGISTRY, imageConfiguration, stepsRunnerFactory, true);
  }

  private  Containerizer(
      String description,
      ImageConfiguration imageConfiguration,
      Function<BuildContext, StepsRunner> stepsRunnerFactory,
      boolean mustBeOnline);

}