@VisibleForTesting
  static Function<List<String>, ProcessBuilder> defaultProcessBuilderFactory(
      String dockerExecutable, ImmutableMap<String, String> dockerEnvironment) {
    return dockerSubCommand -> {
      List<String> dockerCommand = new ArrayList<>(1 + dockerSubCommand.size());
      dockerCommand.add(dockerExecutable);
      dockerCommand.addAll(dockerSubCommand);

      ProcessBuilder processBuilder = new ProcessBuilder(dockerCommand);
      Map<String, String> environment = processBuilder.environment();
      environment.putAll(dockerEnvironment);

      return processBuilder;
    };
  }
Gets a function that takes a {@code docker} subcommand and gives back a {@link ProcessBuilder}
for that {@code docker} command.

@param dockerExecutable path to {@code docker}
@return the default {@link ProcessBuilder} factory for running a {@code docker} subcommand
jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java