use of com.google.cloud.tools.jib.docker.DockerClient in project jib by GoogleContainerTools.
the class Containerizer method to.
/**
* Gets a new {@link Containerizer} that containerizes to a Docker daemon.
*
* @param dockerDaemonImage the {@link DockerDaemonImage} that defines target Docker daemon
* @return a new {@link Containerizer}
*/
public static Containerizer to(DockerDaemonImage dockerDaemonImage) {
ImageConfiguration imageConfiguration = ImageConfiguration.builder(dockerDaemonImage.getImageReference()).build();
DockerClient dockerClient = new DockerClient(dockerDaemonImage.getDockerExecutable(), dockerDaemonImage.getDockerEnvironment());
Function<BuildContext, StepsRunner> stepsRunnerFactory = buildContext -> StepsRunner.begin(buildContext).dockerLoadSteps(dockerClient);
return new Containerizer(DESCRIPTION_FOR_DOCKER_DAEMON, imageConfiguration, stepsRunnerFactory, false);
}
use of com.google.cloud.tools.jib.docker.DockerClient in project jib by google.
the class Containerizer method to.
/**
* Gets a new {@link Containerizer} that containerizes to a Docker daemon.
*
* @param dockerDaemonImage the {@link DockerDaemonImage} that defines target Docker daemon
* @return a new {@link Containerizer}
*/
public static Containerizer to(DockerDaemonImage dockerDaemonImage) {
ImageConfiguration imageConfiguration = ImageConfiguration.builder(dockerDaemonImage.getImageReference()).build();
DockerClient dockerClient = new DockerClient(dockerDaemonImage.getDockerExecutable(), dockerDaemonImage.getDockerEnvironment());
Function<BuildContext, StepsRunner> stepsRunnerFactory = buildContext -> StepsRunner.begin(buildContext).dockerLoadSteps(dockerClient);
return new Containerizer(DESCRIPTION_FOR_DOCKER_DAEMON, imageConfiguration, stepsRunnerFactory, false);
}
Aggregations