private static JibContainerBuilder createJibContainerBuilder(
      BaseImageSpec baseImageSpec, CommonCliOptions commonCliOptions, ConsoleLogger logger)
      throws InvalidImageReferenceException, FileNotFoundException {
    LinkedHashSet<Platform> platforms =
        baseImageSpec.getPlatforms().stream()
            .map(platformSpec -> new Platform(platformSpec.getArchitecture(), platformSpec.getOs()))
            .collect(Collectors.toCollection(LinkedHashSet::new));
    return ContainerBuilders.create(baseImageSpec.getImage(), platforms, commonCliOptions, logger);
  }
Read a buildfile from disk and generate a JibContainerBuilder instance. All parsing of files
considers the directory the buildfile is located in as the working directory.

@param projectRoot the root context directory of this build
@param buildFilePath a file containing the build definition
@param buildCommandOptions the build configuration from the command line
@param commonCliOptions common cli options
@param logger a logger to inject into various objects that do logging
@return a {@link JibContainerBuilder} generated from the contents of {@code buildFilePath}
@throws IOException if an I/O error occurs opening the file, or an error occurs while
    traversing files on the filesystem
@throws InvalidImageReferenceException if the baseImage reference can not be parsed
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/buildfile/BuildFiles.java